O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required