dfc

disk usage display with color-coded graphs

TLDR

Display disk usage with color-coded graph bars
$ dfc
Show all filesystems including pseudo and special
$ dfc -a
Display in a specific unit (K, M, G, T, P, E, Z, Y)
$ dfc -u [G]
Show only specific filesystem types
$ dfc -t [ext4,btrfs]
Export output as CSV
$ dfc -e csv
Sort output by filesystem name
$ dfc -q [name]
Show used size and mount options
$ dfc -d -o
Display without colors
$ dfc -c never

SYNOPSIS

dfc [-abdfhilmMnosTvwW] [-c when] [-e format] [-p fsname] [-q sortby] [-t fstype] [-u unit]

DESCRIPTION

dfc (disk free color) is an enhanced df command that displays filesystem disk space usage with color-coded bar graphs. It provides a more visual and readable alternative to the traditional df output.The graph bars change color based on usage levels: typically green for low usage, yellow for moderate, and red for high usage. This visual representation makes it easy to quickly identify filesystems approaching capacity.Output can be customized extensively through column selection, sorting, and filtering. The tool supports multiple export formats including CSV, JSON, and HTML for integration with other tools or reporting systems. Filesystem type filtering allows focusing on specific storage types.Configuration options can be set in ~/.config/dfc/dfcrc or /etc/dfc.conf for persistent preferences. Color thresholds and graph characters can be customized in the configuration file.

PARAMETERS

-a

Show all filesystems (do not omit any).
-b
Do not show the graph bar.
-c when
Color mode: always, auto, or never.
-d
Show used size.
-e format
Export to format: csv, html, json, tex, or text.
-f
Override auto-adjust behavior by forcing information to be displayed.
-h
Display help.
-i
Show information about inodes instead of disk space.
-l
Show only local filesystems.
-m
Use SI units (powers of 1000 instead of 1024).
-M
Do not print "mounted on".
-n
Do not print header.
-o
Show mount options.
-p fsname
Filter by filesystem name (prefix with - to exclude).
-q sortby
Sort output by: name, type, or mount.
-s
Sum the total usage.
-t fstype
Filter by filesystem types (comma-separated, prefix with - to exclude).
-T
Show filesystem type.
-u unit
Force display unit (h, b, k, m, g, t, p, e, z, y).
-w
Use a wider bar for the graph.
-W
Wide path name (avoid truncation of mount points).

INSTALL

sudo apt install dfc
sudo dnf install dfc
sudo pacman -S dfc
sudo apk add dfc
sudo zypper install dfc
brew install dfc
nix profile install nixpkgs#dfc

CAVEATS

Colors require a terminal with color support. Very long mount point names may be truncated in default mode (use -W for full paths). Some virtual filesystems may show unexpected values. Graph width adapts to terminal width.

HISTORY

dfc was created by Robin Hahling as a colorful, user-friendly replacement for the traditional df command. The project focuses on making disk space monitoring more visual and accessible. It's written in C and available in repositories of most major Linux distributions.

SEE ALSO

df(1), du(1), ncdu(1), dust(1), duf(1)

RESOURCES

Source code