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

When the shell is reading the command line what is the difference between text enclosed between double quotes ( ” ) and text enclosed between signal quotes ( ’ )?

3 Answers  


What are reported commands?

0 Answers  


What is the use of tee command?

0 Answers  


What does the metacharacter mean?

0 Answers  


Which command will print your home directory on screen?

0 Answers  






their is a file1,file2 and i want to append file1 data to file2?

9 Answers   IBM,


What do you mean by zambie process?

6 Answers  


Assume that a file’s permissions give you read and write access. What operations can you perform on the file if it is in a directory which has “r”(read) only process? What operations can you perform on the file if it is in a directory which has “x”(execute) only access?

1 Answers  


How to view the hidden files in /etc directory?

10 Answers  


What is the output of : $ ps-e $ ps-a commands

5 Answers   IBM,


How do I delete files from command prompt?

0 Answers  


what are the different operating systems available?

3 Answers  


Categories