How do i list all files in a directory


#1

how do i list all files in a directory


#2

You can use the

ls

command.


#3

to list all files in a directory, you will want to cd (change directory) to the directory of your choice. Then you can use ls which lists the normal files, ls -a this shows all of the files, even the ones hidden by a period. to list them all in a way that formats it nicely, ls -l, and to see the time it was last edited, you can use ls -t , you can combine all 3 by saying ls -alt