9 Basic �ls� Command Examples
ls -a
- list all files or directories including hidden files or directories.
- file begins with . dot symbol can be regarded as a hidden file
ls -d
- list directories only ,rather than files inside the directory
ls -h
- listall file with human readable format on file sizes (e.g. GB ,KB etc)
ls -i
- list all files with their innode number
ls -l
- list all files with details
ls -S
- list files sort by file size rather than by name
ls -t
- list files order by date rather than name
ls -r
- list files with a reversal order
- for example. the deafault order is from a to z ,
- the order will turn to be z to a using ls -r
ls -R
- Recursively list Sub-Directories
Notes:
You can use alias ll = 'ls -alh --color=auto'
to DIY the ls command as ll command