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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

591


How do I clear my terminal history?

586


Name the general commands in using unix os for a beginner?

624


Who wrote grep?

582


What does #!/ Bin sh do?

591






hw will u use awk in replacing cahrs and files

2733


What is the use of the tee command?

598


Explain ‘library functions’ with respect to unix commands?

604


Describe the zip/unzip command using gzip.

611


How do I run a whois command?

601


What is awk used for?

620


What is the use of sed command in unix?

601


What are the general commands in using unix os for a beginner?

577


How do I use nslookup?

575


How do I search for a file in unix command?

547