duf(1)
duf is a disk usage analyzer that shows how much space directories and files consume in an easy-to-read format.
Synopsis
duf [OPTION]... [FILE]...Description
duf is a modern alternative to du and df that displays disk usage in a user-friendly way with colored output and progress bars. It recursively analyzes directories to show which folders consume the most space, making it easy to identify storage hogs on your system.
By default, duf shows the top-level directories in the current location sorted by size. It supports both local filesystems and remote paths, and can aggregate usage across multiple locations.
Common options
| Flag | What it does |
|---|---|
-a, --all | include hidden files and directories in the analysis |
-r, --recursive | recursively show disk usage for subdirectories |
-h, --hide-progress | hide the progress bar during scanning |
-c, --color | enable colored output (auto, on, off) |
-o, --output | specify output format (list, table, json) |
-i, --ignore-all-in-file | read ignore patterns from a file (like .gitignore) |
-H, --si | use SI units (powers of 1000) instead of IEC units (powers of 1024) |
-d, --max-depth N | limit analysis depth to N levels |
Examples
show disk usage of top-level directories in the current directory
dufanalyze disk usage in the /home directory
duf /homerecursively show all subdirectories and their sizes under /home/user
duf -r /home/userinclude hidden files and directories when analyzing /tmp
duf -a /tmpoutput disk usage data in JSON format for /var to a file
duf -o json /var > usage.jsonshow disk usage up to 2 levels deep starting from root directory
duf --max-depth 2 /display sizes using SI units (MB, GB) instead of binary units (MiB, GiB)
duf -H /homeanalyze current directory while excluding patterns listed in .gitignore
duf --ignore-all-in-file .gitignore .