When administrators and developers ask what means df, they are usually seeking clarity on a fundamental command-line utility. In Unix-like operating systems, df stands for "disk free" and provides a snapshot of available space across mounted filesystems. Rather than diving into complex configurations, this tool offers a straightforward way to monitor storage health before situations escalate.
Understanding the Basic Functionality
At its core, df reports file system disk space usage by examining the kernel's internal data structures. When executed without arguments, it displays information for all mounted filesystems in human-readable blocks. The output typically includes total size, used space, available space, and the mount point path. This makes it an immediate go-to for checking capacity constraints on servers, workstations, and containers.
Key Options and Practical Usage
Running df with specific flags tailors the output to precise needs. The -h or --human-readable option converts block sizes into easily understood units like megabytes or gigabytes. Meanwhile, -T or --print-type adds a column indicating the filesystem type, such as ext4, xfs, or tmpfs. These options transform a basic listing into a detailed report suitable for both quick checks and documentation.
Filtering and Targeted Analysis
Advanced users often leverage additional arguments to refine results. The -i flag shifts the focus to inode usage, which is critical when dealing with large numbers of small files. Specifying a particular directory or device as an argument limits the display to that location, helping to pinpoint space hogs without parsing irrelevant data. This targeted approach proves invaluable during capacity planning and troubleshooting.
Interpreting the Output Correctly Understanding the columns is essential for accurate interpretation. The "Use%" column indicates the percentage of space utilized, while "Available" shows the space left for non-root users. It is a common misconception that "used" space plus "available" equals total size; inodes and reserved blocks for the superuser often occupy a portion of the total. Recognizing this distinction prevents false alarms when available space appears lower than expected. Integration with Monitoring Workflows
Understanding the columns is essential for accurate interpretation. The "Use%" column indicates the percentage of space utilized, while "Available" shows the space left for non-root users. It is a common misconception that "used" space plus "available" equals total size; inodes and reserved blocks for the superuser often occupy a portion of the total. Recognizing this distinction prevents false alarms when available space appears lower than expected.
Beyond manual checks, df integrates smoothly into automated monitoring solutions. Scripts can parse its output to trigger alerts when usage crosses predefined thresholds. By scheduling periodic executions via cron or systemd timers, teams can maintain visibility into storage trends over time. This proactive strategy reduces downtime and supports efficient resource allocation across infrastructure.
Comparison with Complementary Tools
While df focuses on disk space, it works alongside other utilities to provide a complete picture. The du command analyzes directory and file sizes to identify what is consuming space, whereas df confirms the resulting pressure on the filesystem. Together, they allow administrators to distinguish between systemic capacity limits and localized accumulation of files, leading to more informed cleanup decisions.
Best Practices and Considerations
To derive maximum value from df, consistency in invocation is key. Using human-readable output by default ensures quick comprehension during incident response. Regular baseline checks help distinguish normal fluctuations from abnormal spikes. Finally, combining df with filesystem-specific tools, such as tune2fs for ext filesystems, enables deeper insights into allocation policies and reservation settings, supporting long-term storage reliability.