system

df

Reports filesystem disk-space usage. Shows total, used, and available space per mounted filesystem.

df [OPTION]... [FILE]...

Common flags

Flag Purpose
-h Human-readable sizes (KB, MB, GB)
-H Human-readable, powers of 1000 instead of 1024
-T Print the filesystem type
-i List inode information instead of blocks
-x Exclude a filesystem type (e.g. -x tmpfs)
--total Print a grand total line

Examples

df -h

Human-readable usage per mount

df -hT -x tmpfs -x devtmpfs

Real disks only, with filesystem type

df -i /var

Check inode usage on /var

df -h --total /home /var

Report and total selected mounts

Gotcha

df counts space known to the filesystem; deleted-but-still-open files show as used until the holding process exits.

Related commands

← All Linux commands · Linux cheat sheet