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

Can you explain a little bit about command substitution?

878


Name the various commands that are used for the user information in unix.

847


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

876


Which command will print your home directory on screen?

835


What is the use of the tee command?

869


Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

1097


What is the unix command to confirm a remote host is alive or not?

869


What is command statement?

844


What is grep r?

837


Describe the usage and functionality of the command rm –r * in unix?

1666


Which command is used to delete all files in the current directory and all its sub-directories?

1005


What is the use of cut command in unix?

1016


What does this command do,"$more readme.txt“?

920


What is the general format of unix command syntax?

1460


Which command can you use to find the currently running process in unix server?

837