When to use df
Use df to inspect capacity and inode availability for mounted filesystems. Check the filesystem containing the actual failing path; available space on another mount does not help that write operation.
Syntax
df [PARAMETERS] [PATH...]Square brackets mark optional arguments; an ellipsis means repetition. Replace example file names, user names and server addresses with your own values.
Common options and arguments
Usage examples
Check free space
df -hMounted filesystem capacity is shown in human-readable units.
Check the project file system
df -hT /srv/appThe filesystem containing the application path is reported with its type.
Check free inodes
df -i /srv/appInode usage is checked, which can explain allocation failures despite free bytes.
Notes and limitations
- df reports filesystem space usage; du accounts for the files it can traverse.
- Deleted files still held open by processes, and filesystem overhead, can explain differences between df and du.
Common questions and troubleshooting
Why does writing fail even with free disk space?
Inodes, quotas, reserved space, permissions or a read-only mount can block writes. Check the relevant mount and account limits.
Why do df and du disagree?
They measure different things. Deleted files still held open, snapshots, reserved space and mount boundaries can explain differences.
Further help
Options vary by version and distribution. Check the installed documentation with this command: man df.