Skip to main content

df (disk free)

Geoffrey Hunter
mbedded.ninja Author

Overview

The df (disk free) program allows you to see how much space has been used up (and how much is still available) on all of the current mounted file systems.

Usage

The basic way to use df is simply:

$ df

However, this displays sizes in bytes, which on today's GB+ systems, is not very human readable. To fix this, use:

$ df -h

This prints out sizes with human-readable prefixes (e.g. kB, MB, GB). The h stands for "Human readable". Note -H can also be used, but this will use powers of 1000 rather than 1024 is calculate sizes (this is normally not recommended, as the "correct" way is to use powers of 1024).