LinuxCommandLibrary

dfc

Show file system disk space usage

TLDR

Display filesystems and their disk usage in human-readable form with colors and graphs

$ dfc
copy

Display all filesystems including pseudo, duplicate and inaccessible filesystems
$ dfc -a
copy

Display filesystems without color
$ dfc -c never
copy

Display filesystems containing "ext" in the filesystem type
$ dfc -t ext
copy

SYNOPSIS

dfc [OPTION]... [FILE]...

PARAMETERS

-h, --human-readable
    Prints sizes in human-readable format (e.g., 1K, 234M, 2G).

-T, --print-type
    Prints the file system type for each filesystem (e.g., ext4, xfs, tmpfs).

-g, --graph
    Displays an ASCII graph of disk usage for each filesystem.

-d, --disk-device
    Shows the underlying disk device name for each filesystem.

-i, --inodes
    Reports inode information instead of block usage.

-t , --type=
    Limits the listing to filesystems of a specific type (e.g., -t ext4).

-x , --exclude-type=
    Excludes filesystems of a specific type from the listing (e.g., -x tmpfs).

-a, --all
    Includes pseudo, duplicate, and unreachable file systems in the output.

-l, --local
    Limits the listing to local filesystems only.

-c, --no-color
    Disables colored output, printing everything in monochrome.

-S, --si
    Uses powers of 1000 (SI units) instead of 1024 for size suffixes.

-P, --portability
    Uses the POSIX output format, similar to 'df -P'.

-m, --megabytes
    Report in megabytes.

-k, --kilobytes
    Report in kilobytes.

-G, --gigabytes
    Report in gigabytes.

DESCRIPTION

The dfc command is a modern and visually enhanced alternative to the traditional df utility, designed to display disk space usage on mounted filesystems. Unlike df, dfc provides a more human-readable and aesthetically pleasing output by default, incorporating color-coded thresholds for usage, ASCII graphs, and clearer formatting. It aims to improve user experience for interactive shell sessions, making it easier to quickly grasp disk consumption statuses across various storage devices and partitions. dfc can report on total, used, and available space, percentage usage, and optionally display filesystem types, device names, and inode information. Its colored output typically highlights low, medium, and high usage levels, alerting users to critical disk space situations at a glance.

CAVEATS

dfc is typically a third-party utility and may not be installed by default on all Linux distributions. Its enhanced visual output, while great for interactive use, can make programmatic parsing of its output more challenging compared to the standard df command.

COLOR CODING EXPLAINED

dfc uses color to provide immediate visual cues about disk usage:
Green: Low usage (e.g., 0-60%).
Yellow/Orange: Medium usage, approaching critical (e.g., 60-90%).
Red: High usage, potentially critical (e.g., 90% and above).

INTERACTIVE USAGE

dfc is particularly well-suited for interactive use in a shell. Its clear, color-coded, and often graphical output allows system administrators and users to quickly assess disk space availability without needing to carefully parse raw numbers, significantly enhancing readability and quick comprehension.

HISTORY

While the traditional df command is part of GNU Coreutils and has been a staple of Unix-like systems for decades, dfc emerged as a community-driven project to offer a more user-friendly and visually appealing alternative. Its development focused on addressing the common user desire for 'at-a-glance' disk space information, incorporating modern terminal capabilities like color and simple ASCII graphs, making it a popular choice for interactive system administration.

SEE ALSO

df(1), du(1), ls(1), stat(1)

Copied to clipboard