Name

du

Synopsis

du [options] [directories]

Print disk usage (as the number of 1 KB blocks used by each named directory and its subdirectories; default is the current directory).

Options

−0, --null

End output lines with null, not newline.

-a, --all

Print disk usage for all files, not just subdirectories.

--apparent-size

Print the apparent sizes, not disk usage.

-b, --bytes

Print sizes in bytes.

-B bytes, --block-size=bytes

Use the specified number of bytes for the blocksize.

-c, --total

In addition to normal output, print grand total of all arguments.

-D, --dereference-args

Follow symbolic links, but only if they are command-line arguments.

--exclude=pattern

Exclude files that match pattern.

-h, --human-readable

Print sizes in human-readable format.

-H, --si

Like -h, but show as power of 1000 rather than 1024. -H also produces a warning.

--help

Print help message and then exit.

-k, --kilobytes

Print sizes in kilobytes (this is the default).

-l, --count-links

Count the size of all files, whether or not they have already appeared (i.e., via a hard link).

-L, --dereference

Follow symbolic links.

-m

Print sizes in megabytes.

--max-depth=num

Report sizes for directories only down to num levels below the starting point (which is level 0).

-P, --no-dereference

Do not follow symbolic links (the default).

-s, --summarize

Print only the grand total for each named directory.

-S, --separate-dirs

Do not include the sizes of subdirectories when totaling the size of parent directories.

--time[=word]

Print the last-modification time. With ...

Get Linux in a Nutshell, 6th Edition 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.