what is the command to list files in a directory in UNIX?

Answers were Sorted based on User's Feedback



what is the command to list files in a directory in UNIX? ..

Answer / siva

Try this command

ls -lrt | grep "^-" - for list the only files
ls -lrt | grep "^d" - for list the only directory's

Is This Answer Correct ?    5 Yes 0 No

what is the command to list files in a directory in UNIX? ..

Answer / suitable

ls

Is This Answer Correct ?    6 Yes 2 No

what is the command to list files in a directory in UNIX? ..

Answer / jagadeesh kumar.k[tpgsi]

ls -lrt

Is This Answer Correct ?    4 Yes 2 No

what is the command to list files in a directory in UNIX? ..

Answer / brijmohan

ls : this command is used to see the list of file and
folder in present working directory.

ls -ltr : is used to see the file and folder in present
dirctory in alphabetical order.

Is This Answer Correct ?    0 Yes 0 No

what is the command to list files in a directory in UNIX? ..

Answer / yuvaevergreen

ls | grep "^-"

Is This Answer Correct ?    0 Yes 0 No

what is the command to list files in a directory in UNIX? ..

Answer / peeyush

ls -l |grep '^-'

Is This Answer Correct ?    1 Yes 2 No

what is the command to list files in a directory in UNIX? ..

Answer / p.ashwini

ls command is used to list files in a directory

Is This Answer Correct ?    1 Yes 2 No

what is the command to list files in a directory in UNIX? ..

Answer / sudip

ls -l | grep "^d"

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More Unix Commands Interview Questions

Sorry to all Technical person for mistake of Question. Now i am post currect question Why copied file permission is changed in destination. When i give all permission i.e 777 to file and copy that to other location in destination the permission is 755. But if give permission 555 in destination that file permission is 555 and if give permission 444 to file after copy in destination the file permission is 444. These all are happening in normal user. How the umask value is calculate here really i am not understand. Please write the proper answer. Thanks in Advance

3 Answers   TCS,


why metadb requires a seperate slice to create Solaris volume manager

0 Answers   Wipro,


What is in grep command?

0 Answers  


What is the use of egrep command in unix?

0 Answers  


What is pipe command in unix?

0 Answers  






1-how will you display a file whose name is starting with '- '? 2-how will you add a patten at end of every line in vi editor?

7 Answers  


what does the job command do?

4 Answers  


What is the procedure of "at" and crontab" commands?

4 Answers  


describe the escaping sequence characteres in unix

1 Answers  


What is the command to find maximum memory taking process on the server?

0 Answers  


What does the “echo” command do?

0 Answers  


How to add content of one file into another file at the beginning

12 Answers  


Categories