Stats

367 Contributors: 19
2017-04-14
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook

Listing Files

Download bash eBook

Syntax

  • ls [OPTION]... [FILE]...

Parameters

OptionDescription
-a, --allList all entries including ones that start with a dot
-A, --almost-allList all entries excluding . and ..
-cSort files by change time
-d, --directoryList directory entries
-h, --human-readableShow sizes in human readable format (i.e. K, M)
-HSame as above only with powers of 1000 instead of 1024
-lShow contents in long-listing format
-oLong -listing format without group info
-r, --reverseShow contents in reverse order
-s, --sizePrint size of each file in blocks
-SSort by file size
--sort=WORDSort contents by a word. (i.e size, version, status)
-tSort by modification time
-uSort by last access time
-vSort by version
-1List one file per line

Related Examples