duf README

The project's README from github.com/muesli/duf. As one markdown file: README.md.

duf

Latest Release Go Doc Software License Build Status Go ReportCard

Disk Usage/Free Utility (Linux, BSD, macOS & Windows)

duf

Features

Installation

Packages

Linux

BSD

macOS

Windows

Android

Binaries

From source

Make sure you have a working Go environment (Go 1.23 or higher is required). See the install instructions.

Compiling duf is easy, simply run:

git clone https://github.com/muesli/duf.git
cd duf
go build

Usage

You can simply start duf without any command-line arguments:

duf

If you supply arguments, duf will only list specific devices & mount points:

duf /home /some/file

If you want to list everything (including pseudo, duplicate, inaccessible file systems):

duf --all

Filtering

You can show and hide specific tables:

duf --only local,network,fuse,special,loops,binds
duf --hide local,network,fuse,special,loops,binds

You can also show and hide specific filesystems:

duf --only-fs tmpfs,vfat
duf --hide-fs tmpfs,vfat

...or specific mount points:

duf --only-mp /,/home,/dev
duf --hide-mp /,/home,/dev

Wildcards inside quotes work:

duf --only-mp '/sys/*,/dev/*'

Display options

Sort the output:

duf --sort size

Valid keys are: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem.

Show or hide specific columns:

duf --output mountpoint,size,usage

Valid keys are: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem.

List inode information instead of block usage:

duf --inodes

If duf doesn't detect your terminal's colors correctly, you can set a theme:

duf --theme light

Color-coding & Thresholds

duf highlights the availability & usage columns in red, green, or yellow, depending on how much space is still available. You can set your own thresholds:

duf --avail-threshold="10G,1G"
duf --usage-threshold="0.5,0.9"

Bonus

If you prefer your output as JSON:

duf --json

Troubleshooting

Users of oh-my-zsh should be aware that it already defines an alias called duf, which you will have to remove in order to use duf:

unalias duf

Feedback

Got some feedback or suggestions? Please open an issue or drop me a note!

duf (muesli/duf)

system
Searching Database…

15.3K ·GitHub
What is this?duf is a terminal utility for checking disk usage and free space — a user-friendly, better-looking alternative to df for Linux, BSD, macOS and Windows.
How is it different from just using df?Same job, friendlier output: colorful tables that adjust to your terminal's theme and width, with grouping, filtering, sorting and JSON output built in.
Do I need Go or anything else installed first?Not for packages or prebuilt binaries. You only need a working Go environment — version 1.23 or higher — if you want to compile duf from source.
Are there any gotchas after installing?oh-my-zsh defines its own duf alias that shadows the real tool — run unalias duf before first use on those setups.
Is this for sysadmins, or can a regular user pick it up?Anyone who checks disk space from a terminal. It is deliberately user-friendly: color-coded output, device grouping and sorting out of the box.
How do I use it once it's installed?Just run duf with no arguments to list your devices and mount points. Pass paths (duf /home) to show specific ones, or duf --all to include pseudo, duplicate and inaccessible file systems. duf --json gives script-friendly output.
Can I filter what it shows?Yes — duf --only and --hide select table types (local, network, fuse, special, loops, binds), --only-fs and --hide-fs filter filesystem types like tmpfs or vfat, and --only-mp / --hide-mp filter mount points. Quoted wildcards like '/sys/' work too.
Can I sort the output or choose which columns appear?Yes: duf --sort size sorts by keys such as size, used, usage, type or inodes, and duf --output mountpoint,size,usage picks the columns. duf --inodes switches to inode usage instead of block usage.
What do the colors in the output mean?The availability and usage columns are highlighted green, yellow or red depending on how full a device is. You can set custom thresholds with flags like --avail-threshold=10G,1G or --usage-threshold=0.5,0.9.
What are similar projects?veet, btop, tuios, glow, witr, lsoff, fd, eza
Creator
muesli
Size
0.4 MB
Stars
15.3K
Age
6y
Commits · 90 Days