du (display disk usage)

Displays the amount of disk space used by a directory and each subdirectory.

Format:    du directory_name
Examples:  du
           du /home/janet

If the directory named is omitted, the current directory is used. The size is displayed as the number of KB blocks.

OptWhat It DoesExample
-aList all files, not just subdirectoriesdu -a
-bDisplay size in bytesdu -b
-cDisplay grand totaldu -c
-mDisplay size in megabytesdu -m
-sDisplay only the grand totaldu -s

Get Spring Into Linux® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.