Bash Listing Files

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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


Got any Bash Question?