How to identify whether a file is normal file or directory?

Answers were Sorted based on User's Feedback



How to identify whether a file is normal file or directory?..

Answer / vasavi

using file command

Is This Answer Correct ?    8 Yes 0 No

How to identify whether a file is normal file or directory?..

Answer / subbareddy kake

By using file command or

First list the all files by using ls -lrt.you will
following type format.
drwxr--r--
-rwxr--r--

so first one directory second one file only

Is This Answer Correct ?    4 Yes 0 No

How to identify whether a file is normal file or directory?..

Answer / srinath.p

$ls -l filename/directoryname
if the first digit is - then it is file,if it is d then it
is directory

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Unix Commands Interview Questions

what is the meaning of this command rm -rf / what will it do ?

5 Answers   Altair,


Give command that will make the file "run.sh" executable?

10 Answers   IBM,


how will you convert a general file to a hidden file?

4 Answers  


How to set sticky bit, or it have any seperate directory to create sticky bit in sunfir servers. Please help me , i don't no the exact answer?

4 Answers   HCL, Wipro,


who to change the duplex setting of network interface in command line

1 Answers  






What is the difference between cat and more command?

0 Answers  


How to display a file name which has zero bytes in size.

11 Answers   Polaris,


What are grep patterns?

0 Answers  


distinguish between user mode and kernel mode?

4 Answers   Infosys,


Give Command that will change the name of a directly from paypal to eBay

3 Answers   Alcatel, IBM,


Does cp command overwrite files?

0 Answers  


How do you move a process which is running background to foreground?

9 Answers  


Categories