The df command
report file system space usage 6 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.
Options in the examples
-h, --human-readable- print sizes in powers of 1024 (e.g., 1023M)
-i, --inodes- list inode information instead of block usage
-T, --print-type- print file system type
Examples
df -hHuman-readable (GB, MB)
df -h /Specific filesystem
df -TShow filesystem type
df -iShow inode usage
df / | awk 'NR == 2 {print $5}'8%: the "Use%" column of the line for /
df / | awk 'NR == 2 {print $5}' | tr -d %8: just the number
Lessons that use df
- df & du — Disk Usage
- Project: Server Health Check
- Mission: Disk Full
- Mission: The Upgrade Window
- Mission: Deleted, But Still Full