du -- estimate file space usage


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



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.