Skip to content
Latchkey

df Command Reference: Flags, Usage & CI Examples

df reports free and used space on mounted filesystems.

df shows filesystem capacity and usage per mount point. In CI it is the go-to for diagnosing "No space left on device" failures on runners with limited disk.

Common flags and usage

  • -h: human-readable sizes
  • -i: inode usage instead of bytes
  • -T: show the filesystem type
  • --output=source,size,used,avail,pcent: choose columns
  • df -h <path>: just the filesystem holding a path

Example

shell
df -h /
df -i /   # check inode exhaustion, not just bytes

In CI

Run df -h before a large build or artifact download to confirm there is room, and again after a failure to confirm whether disk caused it. "No space left on device" can also be inode exhaustion (millions of small files), which only df -i reveals.

Key takeaways

  • df -h shows free space per filesystem.
  • "No space left" can be inode exhaustion, visible only with df -i.
  • Check df before and after disk-heavy steps in CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →