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 -h

Human-readable (GB, MB)

df -h /

Specific filesystem

df -T

Show filesystem type

df -i

Show 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

Related commands