DU(1)
๐ du(1) โ user commands, but make it a vibe
okay bestie, sit down, hydrate, because we're about to talk about du โ the little icon that walks your whole filesystem tree and tells you who's been eating all your disk space. it's giving detective energy. it's giving "who ate the last slice of pizza" energy. and honestly? it's essential. ๐ต๏ธโโ๏ธ๐
โจ NAME โจ
du โ estimate file space usage ๐
๐ธ SYNOPSIS ๐ธ
du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F
like, you can feed it a bunch of files, or you can feed it a file full of file names. both are valid. both are iconic. โจ
๐ DESCRIPTION ๐
so what it actually does: it summarizes device usage for the set of *FILE*s you hand it, and it goes recursively into directories. like it does not stop at the door. it goes in. it opens the drawers. it counts everything. ๐ฆ
mandatory arguments to long options are mandatory for short options too โ that's not me being dramatic, that's just the rules, periodt.
-0,--nullโ end each output line withNUL, not newline. perfect for when you're piping into something that hates newlines. no cap. ๐-a,--allโ write counts for all files, not just directories. yes, every single one. she's thorough.-A,--apparent-sizeโ print apparent sizes rather than device usage. and here's the tea: apparent size is usually smaller, but it can be larger because of holes in ('sparse') files, internal fragmentation, indirect blocks, etc. so don't come for her when the numbers look weird. ๐ซถ-B,--block-size=SIZEโ scale sizes by SIZE before printing them. see SIZE format below. e.g.,'-BM'prints sizes in units of 1,048,576 bytes. fancy!-b,--bytesโ literally equivalent to'--apparent-size --block-size=1'. same thing, shorter name. slay.-c,--totalโ produce a grand total. the โจgrand finaleโจ.-D,--dereference-argsโ dereference only symlinks that are listed on the command line. just those. not the others. she's selective. ๐-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. and heads up:--max-depth=0is the same as--summarize. ๐--files0-from=Fโ summarize device usage of theNUL-terminated file names specified in file F. if F is-, read names from standard input. iykyk.-Hโ equivalent to--dereference-args(-D). twins fr fr.-h,--human-readableโ print sizes in human readable format (e.g.,1K234M2G). my beloved. ๐ฅฐ--inodesโ list inode usage information instead of block usage. different currency, same chaos.-kโ like--block-size=1K.-L,--dereferenceโ dereference all symbolic links. all of them. no survivors. ๐ฅ-l,--count-linksโ count sizes many times if hard linked. yes, many times. she said what she said.-mโ like--block-size=1M.-P,--no-dereferenceโ don't follow any symbolic links. (this is the default) โ so if you're wondering why she's ignoring your symlinks, bestie, that's the default behavior. ๐-S,--separate-dirsโ for directories, do not include size of subdirectories. keep it separate, keep it clean. โจ--siโ like-h, but use powers of 1000 not 1024. metric girlies rise. ๐-s,--summarizeโ display only a total for each argument. no details, just the receipts. ๐-t,--threshold=SIZEโ exclude entries smaller than SIZE if positive, or entries greater than SIZE if negative. yes, negative numbers do the opposite. mind the sign, queen. โญ--timeโ show time of the last modification of any file in the directory, or any of its subdirectories.--time=WORDโ show time as WORD instead of modification time:atime,access,use,ctimeorstatus. pick your fighter.--time-style=STYLEโ time/date format with--time; see TIME_STYLE below. ๐-X,--exclude-from=FILEโ exclude files that match any pattern in FILE. a blocklist, basically.--exclude=PATTERNโ exclude files that match PATTERN. bye bye ๐ฆ-x,--one-file-systemโ skip directories on different file systems. stay in your lane (lovingly).--helpโ display this help and exit. always there for you. ๐ซถ--versionโ output version information and exit. the origin story.
okay so 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). them's the rules. ๐
the SIZE argument is an integer and an 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. so many letters. so much power. ๐
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 โ important distinction bestie, do not come at her with regex).
- 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='*.o'
will skip all files and subdirectories ending in .o (including the file .o itself). she said what she said and she meant it. ๐ธ
๐ AUTHOR ๐
written by Torbjorn Granlund, David MacKenzie, Paul Eggert, and Jim Meyering. legends, honestly. ๐
๐ REPORTING BUGS ๐
- report bugs to:
<bug-coreutils@gnu.org>. ๐ง - report any translation bugs to:
<https://translationproject.org/team/>. - GNU coreutils home page:
<https://www.gnu.org/software/coreutils/> - general help using GNU software:
<https://www.gnu.org/gethelp/>
โญ COPYRIGHT โญ
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. (like, none. zero. don't @ me. ๐)
๐ฆ SEE ALSO ๐ฆ
- full documentation
<https://www.gnu.org/software/coreutils/du> - or available locally via:
info '(coreutils) du invocation'
and that's the whole thing, bestie ๐ซถ this was GNU coreutils 9.12, dated September 2026. now go free up some disk space, you gorgeous thing. ๐โจ๐
๐ฆ where this page comes from
- arch rolling: coreutils 9.12-2 ยท GPL-3.0-or-later AND GFDL-1.3-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms