DU(1) User Commands DU(1)

du - summarize disk usage

du [-arshHkLxo] [name ...]

Du gives the number of blocks (512 bytes) contained in all files and (recursively) directories within each specified directory or file name. If name is missing, `.' is used.

The following options are supported:

This option causes an entry to be generated for each file. Absence of either causes an entry to be generated for each directory only.
Show error messages. This is the default with /usr/5bin/posix/du and /usr/5bin/posix2001/du.
This option causes only the grand total to be given. Overrides the -a option.

The following options have been introduced by POSIX.2:

Print statistics in units of 1024 bytes, rounded up to the next unit.
Do not cross device boundaries when descending a directory hierarchy.

The following options have been introduced by POSIX.1-2001:

Follow symbolic links given on the command line and count the size of the files they refer to, but do not follow symbolic links found during directory traversal and count the sizes of these symbolic links themselves.
Always follow symbolic links and count the sizes of the files they refer to.

The following options are extensions:

Print statistics in human-readable powers of 1024, i.e. `K' for kilobyte, `M' for megabyte, `G' for gigabyte, `T' for terabyte, `P' for petabyte, and `E' for exabyte.
Do not add sizes of subdirectories to parent directories.

A file which has two links to it is only counted once.

df(1)

Non-directories given as arguments (not under -a or -s options) are not listed with /usr/5bin/du and /usr/5bin/s42/du.

Files with holes may produce incorrect results.

1/24/05 Heirloom Toolchest