List top 5 directories eating up disk space in your current working directory, human-readable format
du -hs * | sort -rh | head -5
du
command: Estimate file space usage.-h
: Print sizes in human-readable format (e.g. 1.5G).-s
: Display only a total for each argument.sort
command : sort lines of text files.-r
: Reverse the result of comparisons.-h
: Compare human readable numbers (e.g. 1G).head
: Output the first n number of files.