{
    "content": [
        {
            "type": "text",
            "text": "# du (man)\n\n## NAME\n\ndu - estimate file space usage\n\n## SYNOPSIS\n\ndu [OPTION]... [FILE]...\ndu [OPTION]... --files0-from=F\n\n## DESCRIPTION\n\nSummarize disk usage of the set of FILEs, recursively for directories.\n\n## TLDR\n\n> Disk usage: estimate and summarize file and directory space usage.\n\n- List the sizes of a directory and any subdirectories, in the given unit (B/KiB/MiB):\n  `du -{{b|k|m}} {{path/to/directory}}`\n- List the sizes of a directory and any subdirectories, in human-readable form (i.e. auto-selecting the appropriate unit for each size):\n  `du {{-h|--human-readable}} {{path/to/directory}}`\n- Show the size of a single directory, in human-readable units:\n  `du {{-sh|--summarize --human-readable}} {{path/to/directory}}`\n- List the human-readable sizes of a directory and of all the files and directories within it:\n  `du {{-ah|--all --human-readable}} {{path/to/directory}}`\n- List the human-readable sizes of a directory and any subdirectories, up to `n` levels deep:\n  `du {{-h|--human-readable}} {{-d|--max-depth}} {{n}} {{path/to/directory}}`\n- List the human-readable size of all `.jpg` files in current directory, and show a cumulative total at the end:\n  `du {{-ch|--total --human-readable}} *.jpg`\n- List all files and directories (including hidden ones) above a certain threshold size (useful for investigating what is actually taking up the space):\n  `du {{-ah|--all --human-readable}} {{-t|--threshold}} {{1G|1024M|1048576K}} .[^.]* *`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (22 subsections)\n- **PATTERNS**\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "du",
        "section": "",
        "mode": "man",
        "summary": "du - estimate file space usage",
        "synopsis": "du [OPTION]... [FILE]...\ndu [OPTION]... --files0-from=F",
        "tldr_summary": "Disk usage: estimate and summarize file and directory space usage.",
        "tldr_examples": [
            {
                "description": "List the sizes of a directory and any subdirectories, in the given unit (B/KiB/MiB)",
                "command": "du -{{b|k|m}} {{path/to/directory}}"
            },
            {
                "description": "List the sizes of a directory and any subdirectories, in human-readable form (i.e. auto-selecting the appropriate unit for each size)",
                "command": "du {{-h|--human-readable}} {{path/to/directory}}"
            },
            {
                "description": "Show the size of a single directory, in human-readable units",
                "command": "du {{-sh|--summarize --human-readable}} {{path/to/directory}}"
            },
            {
                "description": "List the human-readable sizes of a directory and of all the files and directories within it",
                "command": "du {{-ah|--all --human-readable}} {{path/to/directory}}"
            },
            {
                "description": "List the human-readable sizes of a directory and any subdirectories, up to `n` levels deep",
                "command": "du {{-h|--human-readable}} {{-d|--max-depth}} {{n}} {{path/to/directory}}"
            },
            {
                "description": "List the human-readable size of all `.jpg` files in current directory, and show a cumulative total at the end",
                "command": "du {{-ch|--total --human-readable}} *.jpg"
            },
            {
                "description": "List all files and directories (including hidden ones) above a certain threshold size (useful for investigating what is actually taking up the space)",
                "command": "du {{-ah|--all --human-readable}} {{-t|--threshold}} {{1G|1024M|1048576K}} .[^.]* *"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-0",
                "long": "--null",
                "arg": null,
                "description": "end each output line with NUL, not newline"
            },
            {
                "flag": "-a",
                "long": "--all",
                "arg": null,
                "description": "write counts for all files, not just directories"
            },
            {
                "flag": "",
                "long": "--apparent-size",
                "arg": null,
                "description": "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"
            },
            {
                "flag": "-B",
                "long": "--block-size",
                "arg": null,
                "description": "scale sizes by SIZE before printing them; e.g., '-BM' prints sizes in units of 1,048,576 bytes; see SIZE format below"
            },
            {
                "flag": "-b",
                "long": "--bytes",
                "arg": null,
                "description": "equivalent to '--apparent-size --block-size=1'"
            },
            {
                "flag": "-c",
                "long": "--total",
                "arg": null,
                "description": "produce a grand total"
            },
            {
                "flag": "-D",
                "long": "--dereference-args",
                "arg": null,
                "description": "dereference only symlinks that are listed on the command line"
            },
            {
                "flag": "-d",
                "long": "--max-depth",
                "arg": null,
                "description": "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 --files0-from=F summarize disk usage of the NUL-terminated file names specified in file F; if F is -, then read names from standard input"
            },
            {
                "flag": "-D",
                "long": "--dereference-args",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-h",
                "long": "--human-readable",
                "arg": null,
                "description": "print sizes in human readable format (e.g., 1K 234M 2G)"
            },
            {
                "flag": "",
                "long": "--inodes",
                "arg": null,
                "description": "list inode usage information instead of block usage"
            },
            {
                "flag": "-k",
                "long": "--block-size",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-L",
                "long": "--dereference",
                "arg": null,
                "description": "dereference all symbolic links"
            },
            {
                "flag": "-l",
                "long": "--count-links",
                "arg": null,
                "description": "count sizes many times if hard linked"
            },
            {
                "flag": "-m",
                "long": "--block-size",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-P",
                "long": "--no-dereference",
                "arg": null,
                "description": "don't follow any symbolic links (this is the default)"
            },
            {
                "flag": "-S",
                "long": "--separate-dirs",
                "arg": null,
                "description": "for directories do not include size of subdirectories --si like -h, but use powers of 1000 not 1024"
            },
            {
                "flag": "-s",
                "long": "--summarize",
                "arg": null,
                "description": "display only a total for each argument"
            },
            {
                "flag": "-t",
                "long": "--threshold",
                "arg": null,
                "description": "exclude entries smaller than SIZE if positive, or entries greater than SIZE if nega‐ tive --time show time of the last modification of any file in the directory, or any of its subdi‐ rectories --time=WORD show time as WORD instead of modification time: atime, access, use, ctime or status --time-style=STYLE show times using STYLE, which can be: full-iso, long-iso, iso, or +FORMAT; FORMAT is interpreted like in 'date'"
            },
            {
                "flag": "-X",
                "long": "--exclude-from",
                "arg": null,
                "description": "exclude files that match any pattern in FILE --exclude=PATTERN exclude files that match PATTERN"
            },
            {
                "flag": "-x",
                "long": "--one-file-system",
                "arg": null,
                "description": "skip directories on different file systems --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit Display values are in units of the first available SIZE from --block-size, and the DUBLOCKSIZE, BLOCKSIZE and BLOCKSIZE environment variables. Otherwise, units default to 1024 bytes (or 512 if POSIXLYCORRECT 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 (powers of 1024) or KB,MB,... (powers of 1000). Binary prefixes can be used, too: KiB=K, MiB=M, and so on."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": [
                    {
                        "name": "-0 --null",
                        "lines": 2,
                        "flag": "-0",
                        "long": "--null"
                    },
                    {
                        "name": "-a --all",
                        "lines": 2,
                        "flag": "-a",
                        "long": "--all"
                    },
                    {
                        "name": "--apparent-size",
                        "lines": 4,
                        "long": "--apparent-size"
                    },
                    {
                        "name": "-B --block-size",
                        "lines": 3,
                        "flag": "-B",
                        "long": "--block-size"
                    },
                    {
                        "name": "-b --bytes",
                        "lines": 2,
                        "flag": "-b",
                        "long": "--bytes"
                    },
                    {
                        "name": "-c --total",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--total"
                    },
                    {
                        "name": "-D --dereference-args",
                        "lines": 2,
                        "flag": "-D",
                        "long": "--dereference-args"
                    },
                    {
                        "name": "-d --max-depth",
                        "lines": 7,
                        "flag": "-d",
                        "long": "--max-depth"
                    },
                    {
                        "name": "-H --dereference-args -D",
                        "lines": 1,
                        "flag": "-D",
                        "long": "--dereference-args"
                    },
                    {
                        "name": "-h --human-readable",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--human-readable"
                    },
                    {
                        "name": "--inodes",
                        "lines": 2,
                        "long": "--inodes"
                    },
                    {
                        "name": "-k --block-size",
                        "lines": 1,
                        "flag": "-k",
                        "long": "--block-size"
                    },
                    {
                        "name": "-L --dereference",
                        "lines": 2,
                        "flag": "-L",
                        "long": "--dereference"
                    },
                    {
                        "name": "-l --count-links",
                        "lines": 2,
                        "flag": "-l",
                        "long": "--count-links"
                    },
                    {
                        "name": "-m --block-size",
                        "lines": 1,
                        "flag": "-m",
                        "long": "--block-size"
                    },
                    {
                        "name": "-P --no-dereference",
                        "lines": 2,
                        "flag": "-P",
                        "long": "--no-dereference"
                    },
                    {
                        "name": "-S --separate-dirs",
                        "lines": 4,
                        "flag": "-S",
                        "long": "--separate-dirs"
                    },
                    {
                        "name": "-s --summarize",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--summarize"
                    },
                    {
                        "name": "-t --threshold",
                        "lines": 13,
                        "flag": "-t",
                        "long": "--threshold"
                    },
                    {
                        "name": "-X --exclude-from",
                        "lines": 5,
                        "flag": "-X",
                        "long": "--exclude-from"
                    },
                    {
                        "name": "-x --one-file-system",
                        "lines": 4,
                        "flag": "-x",
                        "long": "--one-file-system"
                    },
                    {
                        "name": "--version",
                        "lines": 10,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "PATTERNS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "du - estimate file space usage\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "du [OPTION]... [FILE]...\ndu [OPTION]... --files0-from=F\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Summarize disk usage of the set of FILEs, recursively for directories.\n\nMandatory arguments to long options are mandatory for short options too.\n",
                "subsections": [
                    {
                        "name": "-0 --null",
                        "content": "end each output line with NUL, not newline\n",
                        "flag": "-0",
                        "long": "--null"
                    },
                    {
                        "name": "-a --all",
                        "content": "write counts for all files, not just directories\n",
                        "flag": "-a",
                        "long": "--all"
                    },
                    {
                        "name": "--apparent-size",
                        "content": "print  apparent  sizes,  rather than disk usage; although the apparent size is usually\nsmaller, it may be larger due to holes in ('sparse')  files,  internal  fragmentation,\nindirect blocks, and the like\n",
                        "long": "--apparent-size"
                    },
                    {
                        "name": "-B --block-size",
                        "content": "scale  sizes  by  SIZE  before  printing  them;  e.g.,  '-BM' prints sizes in units of\n1,048,576 bytes; see SIZE format below\n",
                        "flag": "-B",
                        "long": "--block-size"
                    },
                    {
                        "name": "-b --bytes",
                        "content": "equivalent to '--apparent-size --block-size=1'\n",
                        "flag": "-b",
                        "long": "--bytes"
                    },
                    {
                        "name": "-c --total",
                        "content": "produce a grand total\n",
                        "flag": "-c",
                        "long": "--total"
                    },
                    {
                        "name": "-D --dereference-args",
                        "content": "dereference only symlinks that are listed on the command line\n",
                        "flag": "-D",
                        "long": "--dereference-args"
                    },
                    {
                        "name": "-d --max-depth",
                        "content": "print the total for a directory (or file, with --all) only if it is N or fewer  levels\nbelow the command line argument;  --max-depth=0 is the same as --summarize\n\n--files0-from=F\nsummarize  disk usage of the NUL-terminated file names specified in file F; if F is -,\nthen read names from standard input\n",
                        "flag": "-d",
                        "long": "--max-depth"
                    },
                    {
                        "name": "-H --dereference-args -D",
                        "content": "",
                        "flag": "-D",
                        "long": "--dereference-args"
                    },
                    {
                        "name": "-h --human-readable",
                        "content": "print sizes in human readable format (e.g., 1K 234M 2G)\n",
                        "flag": "-h",
                        "long": "--human-readable"
                    },
                    {
                        "name": "--inodes",
                        "content": "list inode usage information instead of block usage\n",
                        "long": "--inodes"
                    },
                    {
                        "name": "-k --block-size",
                        "content": "",
                        "flag": "-k",
                        "long": "--block-size"
                    },
                    {
                        "name": "-L --dereference",
                        "content": "dereference all symbolic links\n",
                        "flag": "-L",
                        "long": "--dereference"
                    },
                    {
                        "name": "-l --count-links",
                        "content": "count sizes many times if hard linked\n",
                        "flag": "-l",
                        "long": "--count-links"
                    },
                    {
                        "name": "-m --block-size",
                        "content": "",
                        "flag": "-m",
                        "long": "--block-size"
                    },
                    {
                        "name": "-P --no-dereference",
                        "content": "don't follow any symbolic links (this is the default)\n",
                        "flag": "-P",
                        "long": "--no-dereference"
                    },
                    {
                        "name": "-S --separate-dirs",
                        "content": "for directories do not include size of subdirectories\n\n--si   like -h, but use powers of 1000 not 1024\n",
                        "flag": "-S",
                        "long": "--separate-dirs"
                    },
                    {
                        "name": "-s --summarize",
                        "content": "display only a total for each argument\n",
                        "flag": "-s",
                        "long": "--summarize"
                    },
                    {
                        "name": "-t --threshold",
                        "content": "exclude entries smaller than SIZE if positive, or entries greater than SIZE  if  nega‐\ntive\n\n--time show  time of the last modification of any file in the directory, or any of its subdi‐\nrectories\n\n--time=WORD\nshow time as WORD instead of modification time: atime, access, use, ctime or status\n\n--time-style=STYLE\nshow times using STYLE, which can be: full-iso, long-iso, iso, or +FORMAT;  FORMAT  is\ninterpreted like in 'date'\n",
                        "flag": "-t",
                        "long": "--threshold"
                    },
                    {
                        "name": "-X --exclude-from",
                        "content": "exclude files that match any pattern in FILE\n\n--exclude=PATTERN\nexclude files that match PATTERN\n",
                        "flag": "-X",
                        "long": "--exclude-from"
                    },
                    {
                        "name": "-x --one-file-system",
                        "content": "skip directories on different file systems\n\n--help display this help and exit\n",
                        "flag": "-x",
                        "long": "--one-file-system"
                    },
                    {
                        "name": "--version",
                        "content": "output version information and exit\n\nDisplay  values  are  in  units  of  the  first  available  SIZE  from  --block-size, and the\nDUBLOCKSIZE, BLOCKSIZE and BLOCKSIZE environment variables.  Otherwise, units  default  to\n1024 bytes (or 512 if POSIXLYCORRECT is set).\n\nThe  SIZE  argument  is  an  integer  and optional unit (example: 10K is 10*1024).  Units are\nK,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).  Binary prefixes can be used,\ntoo: KiB=K, MiB=M, and so on.\n",
                        "long": "--version"
                    }
                ]
            },
            "PATTERNS": {
                "content": "PATTERN is a shell pattern (not a regular expression).  The pattern ? matches any one charac‐\nter, whereas * matches any string (composed of zero, one or multiple characters).  For  exam‐\nple, *.o will match any files whose names end in .o.  Therefore, the command\n\ndu --exclude='*.o'\n\nwill skip all files and subdirectories ending in .o (including the file .o itself).\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Written by Torbjorn Granlund, David MacKenzie, Paul Eggert, and Jim Meyering.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright  ©  2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later\n<https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Full documentation <https://www.gnu.org/software/coreutils/du>\nor available locally via: info '(coreutils) du invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                       DU(1)",
                "subsections": []
            }
        }
    }
}