du -- estimate file space usage


du is as specified in the SUS but with differences as listed below.


If the -k option is not specified, disk space is shown in unspecified units. Applications should specify -k.

LSB Deprecated Differences

The behaviors specified in this section are expected to disappear from a future version of the LSB; applications should only use the non-LSB-deprecated behaviors.


uses SIZE-byte blocks.

-b, --bytes

prints size in bytes.

-c, --total

produces a grand total.

-D, --dereference-args

dereferences PATHs when symbolic link.

-h, --human-readable

prints sizes in human-readable format (e.g., 1K, 234M, 2G).


is equivalent to --block-size=1024.

--l, --count-links

counts sizes many times if hard-linked.

-L, --dereference

dereferences all symbolic links.

-m, --megabytes

is equivalent to --block-size=1048576.


has implementation-dependent behavior.

-S, --separate-dirs

does not include size of subdirectories.

-X FILE, --exclude-from=FILE

excludes files that match any pattern in FILE.


excludes files that match PAT.


prints the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize.


outputs version information and exits.