15 Basic ‘ls’ Command Examples in Linux
I learned at least three things from this list, and I’ve been using ls for years.
15 Basic ‘ls’ Command Examples in Linux
The new things for me were:
- ls -lh – human readable format on file sizes
- ls -ltr – reverse output order, which is particularly useful when sorting by date
- ls -lS – sort by file size
- ls -R – Recursively list Sub-Directories (can be combined with S for size)
Note: so far, all of these commands work for me in OS/X as well.