OS Manuals

/usr/bin/du

Cross-platform Rust rewrite of the GNU coreutils.

From uutils 0.12.0-r6 (os), captured 2026-11-07 by running du --help (exit 0). permalink

Estimate file space usage

Usage: du [OPTION]... [FILE]...
       du [OPTION]... --files0-from=F

Options:
      --help                 Print help information.
  -a, --all                  write counts for all files, not just directories
  -A, --apparent-size        print apparent sizes, rather than disk usage although the apparent size
                             is usually smaller, it may be larger due to holes in ('sparse') files,
                             internal fragmentation, indirect blocks, and the like
  -B, --block-size <SIZE>    scale sizes by SIZE before printing them. E.g., '-BM' prints sizes in
                             units of 1,048,576 bytes. See SIZE format below.
  -b, --bytes                equivalent to '--apparent-size --block-size=1'
  -c, --total                produce a grand total
  -d, --max-depth <N>        print 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
  -h, --human-readable       print sizes in human readable format (e.g., 1K 234M 2G)
      --inodes               list inode usage information instead of block usage like
                             --block-size=1K
  -k                         like --block-size=1K
  -l, --count-links          count sizes many times if hard linked
  -L, --dereference          follow all symbolic links
  -D, --dereference-args     follow only symlinks that are listed on the command line [alias: -H]
  -P, --no-dereference       don't follow any symbolic links (this is the default)
  -m                         like --block-size=1M
  -0, --null                 end each output line with 0 byte rather than newline
  -S, --separate-dirs        do not include size of subdirectories
  -s, --summarize            display only a total for each argument
      --si                   like -h, but use powers of 1000 not 1024
  -x, --one-file-system      skip directories on different file systems
  -t, --threshold <SIZE>     exclude entries smaller than SIZE if positive, or entries greater than
                             SIZE if negative
  -v, --verbose              verbose mode (option not present in GNU/Coreutils)
      --exclude <PATTERN>    exclude files that match PATTERN
  -X, --exclude-from <FILE>  exclude files that match any pattern in FILE
      --files0-from <FILE>   summarize device usage of the NUL-terminated file names specified in
                             file F; if F is -, then read names from standard input
      --time[=<WORD>...]     show time of the last modification of any file in the directory, or any
                             of its subdirectories. If WORD is given, show time as WORD instead of
                             modification time: atime, access, use, ctime, status, birth or creation
                             [possible values: atime, ctime, creation]
      --time-style <STYLE>   show times using style STYLE: full-iso, long-iso, iso, +FORMAT FORMAT
                             is interpreted like 'date'
  -V, --version              Print version

Display values are in units of the first available SIZE from --block-size,
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).

SIZE is an integer and optional unit (example: 10M is 10*1024*1024).
Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB,... (powers
of 1000). Units can be decimal, hexadecimal, octal, binary.

PATTERN allows some advanced exclusions. For example, the following syntaxes
are supported:

  - ? will match only one character
  - * will match zero or more characters
  - {a,b} will match a or b
Options (28)
OptionDescriptionSource
--helpPrint help information.help + man
-a, --allwrite counts for all files, not just directorieshelp + man
-A, --apparent-sizeprint apparent sizes, rather than disk usage although the apparent size is usually smaller, it may be larger due to holes in ('sparse') files, internal fragmentation, indirect blocks, and the likehelp + man
-B, --block-size SIZEscale sizes by SIZE before printing them.help + man
-b, --bytesequivalent to '--apparent-size --block-size=1'help + man
-c, --totalproduce a grand totalhelp + man
-d, --max-depth Nprint the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument;help + man
-h, --human-readableprint sizes in human readable format (e.g., 1K 234M 2G)help + man
--inodeslist inode usage information instead of block usage like --block-size=1Khelp + man
-klike --block-size=1Khelp + man
-l, --count-linkscount sizes many times if hard linkedhelp + man
-L, --dereferencefollow all symbolic linkshelp + man
-D, --dereference-argsfollow only symlinks that are listed on the command line [alias: -H]help + man
-P, --no-dereferencedon't follow any symbolic links (this is the default)help + man
-mlike --block-size=1Mhelp + man
-0, --nullend each output line with 0 byte rather than newlinehelp + man
-S, --separate-dirsdo not include size of subdirectorieshelp + man
-s, --summarizedisplay only a total for each argumenthelp + man
--silike -h, but use powers of 1000 not 1024help + man
-x, --one-file-systemskip directories on different file systemshelp + man
-t, --threshold SIZEexclude entries smaller than SIZE if positive, or entries greater than SIZE if negativehelp + man
-v, --verboseverbose mode (option not present in GNU/Coreutils)help + man
--exclude PATTERNexclude files that match PATTERNhelp + man
-X, --exclude-from FILEexclude files that match any pattern in FILEhelp + man
--files0-from FILEsummarize device usage of the NUL-terminated file names specified in file F;help + man
--time WORD>...show time of the last modification of any file in the directory, or any of its subdirectories.help
--time-style STYLEshow times using style STYLE: full-iso, long-iso, iso, +FORMAT FORMAT is interpreted like 'date'help + man
-V, --versionPrint versionhelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.