Check file size and sort: ls -lhS
Check the folder size: du -s ./folder
Check size and sort:
Will sort the folders by size.
du -chd 1 | sort -h
(Helpful when looking to clear space.)
Note that if you want to know all {sub}folders size inside a directory, you can also use the -dor --max-depth option of du (which take an argument: the recursive limit)
du -h /path/to/directory -d 1
Check disk usage du -sh *
Short version of:du --summary --human-readable *
du
: Disk Usage
-s
: Display a summary for each specified file. (Equivalent to -d 0)
-h
: "Human-readable" output. Use unit suffixes: Byte, Kibibyte (KiB), Mebibyte (MiB), Gibibyte (GiB), Tebibyte (TiB) and Pebibyte (PiB). (BASE2)