Bash Listing Files


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


-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