Forever & AlwaysLINUX COMMAND ATLAS

LINUX COMMAND ATLAS · COMMAND GUIDE

Linux df command

Show available and used disk space for mounted filesystems.

GNU Coreutils

Syntax

Command form
df [OPTION]... [FILE]...

Common options

6 options
OptionWhat it does
-h, --human-readableShow sizes in powers of 1024 with readable units.
-H, --siShow sizes in powers of 1000.
-T, --print-typeInclude filesystem type.
-i, --inodesShow inode usage instead of block usage.
-P, --portabilityUse the POSIX output format.
--totalDisplay a grand total where applicable.

Usage examples

3 examples

Show available and used disk space for mounted filesystems.

df -h

Show mounted filesystems, types and readable capacity.

df -hT

Check inode usage for the filesystem containing /var.

df -i /var

Notes

df reports filesystem-level space. A full filesystem and exhausted inodes are different problems; check both when diagnosing write failures.