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

How do you find out all processes that are currently running in UNIX OS?

10 Answers  


Give Command that will move a single file called "unix.txt"

7 Answers   IBM,


how to sort the content of the file based on numeric values

0 Answers   Epsilon,


How to check whether some services are running in another server or not? Suppose i am currently in a server named A.I want to check whether some services are running in server B without logging into the server B.

3 Answers   Amazon, MBA, Syntel, TCS, Unisys,


which command is used to change group?

5 Answers  


How do I run a bash script?

0 Answers  


Hi All, Can you please let me know how to grep for a particular pattern in unix. I want to print the dates from the file exp.txt. the date pattern is DD:MM:YYYY, I just want to print all the dates from the file exp.txt.

8 Answers   Concentrix, IBM, Symantec, TCS,


distinguish between interrupts and exceptions?

2 Answers   Infosys,


Explain command to view process running?

0 Answers  


Through which command will redirect output to bOth screen and files at the same time?

3 Answers  


In Unix file permissions what does the second field denotes?

3 Answers  


Write a command to find all of the files which have been accessed within the last 30 days.

5 Answers   Google, IBM, Satyam,


Categories