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

What will the following command do?

615


What are the commands in UNIX to list the files in a Directory?

616


What is s and g in sed command?

557


Which unix command lists files/folders in alphabetical order?

614


What does touch command do in unix?

725






How to display no of records in oracle using unix command?

589


What is a bash command?

624


How do I run a bash script?

580


What is the use of the tee command?

598


Is ‘du’ a command? If so, what is its use?

634


What does the command ' $who | sort –logfile > newfile' do?

768


Which command is used to copy files?

556


What is a command and examples?

583


What is grep and how do you use it?

575


What are filter commands in unix?

554