df(1)
Report file system disk space usage.
Synopsis
df [OPTION]... [FILE]...Description
The df command displays the amount of disk space used and available on file systems. By default, it shows usage for all mounted file systems. You can specify particular files or directories to see the usage of the file system containing them.
Output includes the total size, used space, available space, percentage used, and mount point for each file system. This is essential for monitoring disk capacity and preventing file system exhaustion.
Common options
| Flag | What it does |
|---|---|
-h | Human-readable format (KB, MB, GB) |
-k | Show sizes in 1024-byte blocks (default) |
-m | Show sizes in megabytes |
-g | Show sizes in gigabytes |
-i | Show inode usage instead of block usage |
-T | Include file system type in output |
-a | Include all file systems, including dummy ones |
-t TYPE | Limit output to file systems of type TYPE |
-x TYPE | Exclude file systems of type TYPE |
-P | POSIX output format (one line per file system) |
Examples
Show disk usage for all mounted file systems in human-readable format
df -hShow disk usage of the file system containing /home directory
df -h /homeDisplay disk usage with file system types (ext4, tmpfs, etc.)
df -TShow inode usage instead of disk block usage
df -iDisplay only ext4 file systems
df -t ext4Show disk usage excluding tmpfs file systems in human-readable format
df -x tmpfs -hCheck disk usage for multiple specific mount points
df -h /var /tmp /homePOSIX format with human-readable sizes (useful for scripting)
df -Ph