gdu(1)

✨ NAME ✨

okay so this is gdu(1) β€” the General Commands Manual page for it β€” and it's literally a pretty fast disk usage analyzer written in Go πŸ’– that's the whole vibe, that's the name, periodt.


πŸŽ€ SYNOPSIS πŸŽ€

gdu [flags] [directory_to_scan...]

πŸ¦‹ DESCRIPTION πŸ¦‹

Pretty fast disk usage analyzer written in Go. no cap, that's the pitch πŸ”₯

So here's the tea: gdu is built primarily for SSD disks, where it can fully utilize parallel processing β€” like, it eats on an SSD fr fr πŸ‘‘. HDDs work as well, bestie, but the performance gain is not so huge. lowkey expected but we move πŸ’…

You can hand it more than one directory. They are scanned one after another and presented together under a virtual top level directory named (multiple), listed by their absolute path. Cute, right? 🌸 But here's the warning: nested directories are rejected, because scanning both would count the nested part twice 😭 double-counting is not the move.

Also important: exporting (--output-file) and database storage (--db) accept a single directory only. just one. don't push it 🫢


πŸ’… OPTIONS πŸ’…

  • -h, --help[=false] β€” help for gdu. you're welcome πŸ’–
  • -i, --ignore-dirs=[/proc,/dev,/sys,/run] β€” Paths to ignore (separated by comma). Supports both absolute and relative paths.
  • -I, --ignore-dirs-pattern β€” Path patterns to ignore (separated by comma). Supports both absolute and relative path patterns.
  • -X, --ignore-from β€” Read path patterns to ignore from file. Supports both absolute and relative path patterns.
  • -G, --ignore-from-gitignore β€” Read directories to ignore from file with .gitignore-style patterns. A name without / matches at any depth, a trailing / marks a directory, a leading / anchors the pattern to the directory being scanned. Blank lines and comments are skipped. Negated patterns (starting with !) and patterns matching every directory (such as * or **) are rejected with an error, as both would make gdu report less than is really on disk. -I, -X and -G combine: a directory is ignored if it matches any of them. Paths from -i apply in addition.
  • -T, --type β€” File types to include (e.g., –type yaml,json)
  • -E, --exclude-type β€” File types to exclude (e.g., –exclude-type yaml,json)
  • --max-age β€” Include files with mtime no older than DURATION (e.g., 7d, 2h30m, 1y2mo)
  • --min-age β€” Include files with mtime at least DURATION old (e.g., 30d, 1w)
  • --since β€” Include files with mtime >= WHEN. WHEN accepts RFC3339 timestamp (e.g., 2025-08-11T01:00:00-07:00) or date only YYYY-MM-DD (calendar-day compare; includes the whole day) πŸ—“οΈ
  • --until β€” Include files with mtime <= WHEN. WHEN accepts RFC3339 timestamp or date only YYYY-MM-DD
  • -l, --log-file="/dev/null" β€” Path to a logfile
  • -m, --max-cores β€” Set max cores that Gdu will use.
  • --sequential[=false] β€” Use sequential scanning (intended for rotating HDDs)
  • -c, --no-color[=false] β€” Do not use colorized output
  • -x, --no-cross[=false] β€” Do not cross filesystem boundaries
  • -H, --no-hidden[=false] β€” Ignore hidden directories (beginning with dot)
  • -L, --follow-symlinks[=false] β€” Follow symlinks for files, i.e. show the size of the file to which symlink points to (symlinks to directories are not followed) πŸ”—
  • -A, --show-annexed-size[=false] β€” Use apparent size of git-annex'ed files in case files are not present locally (real usage is zero)
  • -n, --non-interactive[=false] β€” Do not run in interactive mode
  • --interactive[=false] β€” Force interactive mode even when output is not a TTY
  • -p, --no-progress[=false] β€” Do not show progress in non-interactive mode
  • -u, --no-unicode[=false] β€” Do not use Unicode symbols (for size bar)
  • -s, --summarize[=false] β€” Show only a total in non-interactive mode
  • -t, --top[=0] β€” Show only top X largest files in non-interactive mode
  • --reverse-sort[=false] β€” Reverse sorting order (smallest to largest) in non-interactive mode
  • -d, --show-disks[=false] β€” Show all mounted disks
  • -a, --show-apparent-size[=false] β€” Show apparent size
  • -B, --show-relative-size[=false] β€” Show the size bar relative to the largest sibling instead of the parent directory
  • -C, --show-item-count[=false] β€” Show number of items in directory
  • -k, --show-in-kib[=false] β€” Show sizes in KiB (or kB with –si) in non-interactive mode
  • -M, --show-mtime[=false] β€” Show latest mtime of items in directory
  • --show-symlink-target[=false] β€” Show symlink target (name -> target) in the file list
  • --archive-browsing[=false] β€” Enable browsing of zip/jar/tar archives (tar, tar.gz, tar.bz2, tar.xz) πŸ—œοΈ
  • --depth[=0] β€” Show directory structure up to specified depth in non-interactive mode (0 means the flag is ignored); also limits entries inside browsed archives
  • --collapse-path[=false] β€” Collapse single-child directory chains
  • --mouse[=false] β€” Use mouse 🐭
  • --si[=false] β€” Show sizes with decimal SI prefixes (kB, MB, GB) instead of binary prefixes (KiB, MiB, GiB)
  • --no-prefix[=false] β€” Show sizes as raw numbers without any prefixes (SI or binary) in non-interactive mode
  • --no-spawn-shell[=false] β€” Do not allow spawning shell
  • --no-confirm-quit[=false] β€” Do not ask for confirmation before quitting after a long scan
  • --ctrl-c-quits[=false] β€” Quit gdu when Ctrl+C is pressed during a scan instead of stopping the scan and keeping results. Esc always stops the scan and keeps the results found so far, regardless of this flag. πŸ’€
  • --no-delete[=false] β€” Do not allow deletions. Applies to the web UI as well: the delete action is hidden and the server rejects delete requests.
    • Reveal remains available in the web UI because it does not modify scanned data. Deletion while a filter is active is disabled by default: the terminal UI applies this to time filters, the web UI to any active filter, file-type filters included. Set GDU_ALLOW_DELETE_WITH_FILTER=1 to override the check; the displayed tree may then omit files that are still present on disk. ⚠️ like, fr, be careful
  • --no-view-file[=false] β€” Do not allow viewing file contents
  • --trash-command="" β€” Command used to move items to trash instead of the built-in trash. Used by the terminal UI's D key and the web UI's "Move to Trash" action. The command is evaluated by /bin/sh with the absolute path of the item appended as an argument, which is also exported as GDU_TRASH_PATH. Commands taking their destination last can refer to the path as "$1" instead, in which case it is not appended. The command must not be interactive. Not supported on Windows. For example: trash-put --trash-dir ~/mytrash or mv -f "$1" ~/mytrash/ πŸ—‘οΈ
  • --web[=false] β€” Run the web UI (serves a browser interface instead of the terminal UI). Gdu scans the given directory, prints the URL and serves a read-only browser interface for it. 🌐
  • --web-listen="" β€” Address for the web UI to listen on. By default the server binds to localhost on a random free port. Binding to a non-loopback address makes scan details reachable by other hosts on the network.
  • --web-open[=true] β€” Open the web UI in the default browser on start. Use --web-open=false to only print the URL.
  • -f, --input-file β€” Import analysis from JSON file. If the file is -, read from standard input.
  • -o, --output-file β€” Export all info into file as JSON. If the file is -, write to standard output.
  • --output-attrs β€” Export only selected JSON attributes (name,asize,dsize,items,mtime,notreg,ino). Requires --output-file. The name attribute is always included and directories always carry their asize, dsize and items summary stats so they can be preserved on import.
  • --config-file="$HOME/.gdu.yaml" β€” Read config from file
  • --write-config[=false] β€” Write current configuration to file (default is $HOME/.gdu.yaml)
  • --enable-profiling[=false] β€” Enable collection of profiling data and provide it on http://localhost:6060/debug/pprof/
  • -D, --db β€” Store analysis in database (.sqlite for SQLite, .badger for BadgerDB)
  • -r, --read-from-storage[=false] β€” Use existing database instead of re-scanning
  • -v, --version[=false] β€” Print version

πŸ” FILE FLAGS πŸ”

Files and directories may be prefixed by a one-character flag, and here's what each one means bestie, memorize these iykyk:

  • ! β€” An error occurred while reading this directory.
  • . β€” An error occurred while reading a subdirectory, size may be not correct. 😭
  • @ β€” File is symlink or socket. Symlinks can be shown as name -> target (the link target is displayed next to the name, like ls -l).
  • H β€” Same file was already counted (hard link).
  • e β€” Directory is empty.

okay that's the whole page bestie, go analyze some disks πŸ’–πŸ¦‹βœ¨ no cap, this was gdu(1) from the General Commands Manual, dated 2026-10-05 β€” slay, bye πŸ‘‘πŸŽ€

πŸ“¦ where this page comes from