Use du to Summarize Disk Usage of The Set of Files, Recursively for Directories

du -hs /dir1
# -h: human readable
# -s: summarize

du -h -d 1 /dir
# -d: max depth

du -m /dir
# -m: unit of 1MB

du -k /dir
# -k: unit of 1KB

du -hc /dir
# -c: print total at last line

du -S /dir
# -S: not include size of subdirectories

du -a /dir
# -a: all files, not just directories


Leave a Reply

Your email address will not be published. Required fields are marked *