Translations:Linux introduction/8/en
Jump to navigation
Jump to search
Listing directory contents
To list all files in a directory in a terminal, use the ls
(list) command:
[name@server ~]$ ls
To include hidden files:
[name@server ~]$ ls -a
To sort results by date (from newest to oldest) instead of alphabetically:
[name@server ~]$ ls -t
And, to obtain detailed information on all files (permissions, owner, group, size and last modification date):
[name@server ~]$ ls -l
The option -h
gives the file sizes in human readable format.