www.LinuxHowtos.org
DU
Section: User Commands (1)Updated: February 2026
Index Return to Main Contents
NAME
du - estimate file space usageSYNOPSIS
du [,OPTION/]... [,FILE/]...du [,OPTION/]... ,-files-from=F/
DESCRIPTION
Summarize device usage of the set of FILEs, recursively for directories.
Mandatory arguments to long options are mandatory for short options too.
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-0'-0, --nullX'tty: link'
- end each output line with NUL, not newline
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-a'-a, --allX'tty: link'
- write counts for all files, not just directories
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-A'-A, --apparent-sizeX'tty: link'
- print apparent sizes rather than device usage; although the apparent size is usually smaller, it may be larger due to holes in ('sparse') files, internal fragmentation, indirect blocks, etc.
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-B'-B, --block-size=,SIZEX'tty: link'/
- scale sizes by SIZE before printing them; See SIZE format below; E.g., '-BM' prints sizes in units of 1,048,576 bytes
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-b'-b, --bytesX'tty: link'
- equivalent to '--apparent-size --block-size=,1'/
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-c'-c, --totalX'tty: link'
- produce a grand total
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-D'-D, --dereference-argsX'tty: link'
- dereference only symlinks that are listed on the command line
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-d'-d, --max-depth=,NX'tty: link'/
- 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
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-files-from'--files0-from=FX'tty: link'
- summarize device usage of the NUL-terminated file names specified in file F; if F is -, read names from standard input
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-H'-HX'tty: link'
- equivalent to --dereference-args (-D)
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-h'-h, --human-readableX'tty: link'
- print sizes in human readable format (e.g., 1K 234M 2G)
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-inodes'--inodesX'tty: link'
- list inode usage information instead of block usage
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-k'-kX'tty: link'
- like --block-size=,1K/
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-L'-L, --dereferenceX'tty: link'
- dereference all symbolic links
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-l'-l, --count-linksX'tty: link'
- count sizes many times if hard linked
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-m'-mX'tty: link'
- like --block-size=,1M/
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-P'-P, --no-dereferenceX'tty: link'
- don't follow any symbolic links (this is the default)
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-S'-S, --separate-dirsX'tty: link'
- for directories do not include size of subdirectories
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-si'--siX'tty: link'
- like -h, but use powers of 1000 not 1024
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-s'-s, --summarizeX'tty: link'
- display only a total for each argument
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-t'-t, --threshold=,SIZEX'tty: link'/
- exclude entries smaller than SIZE if positive, or entries greater than SIZE if negative
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-time'--timeX'tty: link'
- show time of the last modification of any file in the directory, or any of its subdirectories
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-time'--time=WORDX'tty: link'
- show time as WORD instead of modification time: atime, access, use, ctime or status
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-tim-style'--time-style=STYLEX'tty: link'
- time/date format with --time; see TIME_STYLE below
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-X'-X, --exclude-from=,FILEX'tty: link'/
- exclude files that match any pattern in FILE
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-exclude'--exclude=PATTERNX'tty: link'
- exclude files that match PATTERN
- X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#d-x'-x, --one-file-systemX'tty: link'
- skip directories on different file systems
- X'tty: link https://www.gnu.org/software/coreutils/du#d-help'--helpX'tty: link'
- display this help and exit
- X'tty: link https://www.gnu.org/software/coreutils/du#d-version'--versionX'tty: link'
- output version information and exit
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).
The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024) or KB,MB,... (powers of 1000). Binary prefixes can be used, too: KiB=K, MiB=M, and so on.
The --time-style STYLE argument can be full-iso, long-iso, iso, or +FORMAT. FORMAT is interpreted like in date(1). Also the TIME_STYLE environment variable sets the default style to use.
PATTERNS
PATTERN is a shell pattern (not a regular expression). The pattern ? matches any one character, whereas * matches any string (composed of zero, one or multiple characters). For example, *.o will match any files whose names end in .o. Therefore, the command- du --exclude=aq*.oaq
will skip all files and subdirectories ending in .o (including the file .o itself).
AUTHOR
Written by Torbjorn Granlund, David MacKenzie, Paul Eggert, and Jim Meyering.REPORTING BUGS
Report bugs to: bug-coreutils@gnu.org
Report Gentoo bugs to: https://bugs.gentoo.org/
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
General help using GNU software: <https://www.gnu.org/gethelp/>
Report any translation bugs to <https://translationproject.org/team/>
SEE ALSO
Full documentation <https://www.gnu.org/software/coreutils/du>or available locally via: info aq(coreutils) du invocationaq
Packaged by Gentoo (9.10 (p0))
Copyright © 2026 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.