df Show free and used space on disks
Reports how much space is used and how much is free on each mounted filesystem. Reach for it when a disk is filling up and you need to know which one. Unlike du, which measures folders, df looks at whole disks.
Synopsis
df [OPTION]... [FILE]...
Common options
| Option or form | What it does |
|---|---|
-h | Human-readable sizes in powers of 1024, such as 466Gi on macOS or 466G on Linux |
-H | Human-readable sizes in powers of 1000, so they match what disk makers print on the box. GNU/Linux spells it --si |
-k | Report sizes in 1024-byte blocks |
-i | Show inode counts, the number of files a filesystem can hold. This is the default on macOS |
-l | Show only local disks, hiding network mounts |
-P | Portable output format: one line per filesystem, with fixed columns. Safe for scripts |
-T type | macOS: show only filesystems of the given type. On GNU/Linux -T instead prints a type column, and -t type filters |
-Y | macOS: add a column with the filesystem type, such as apfs. GNU/Linux has no -Y and uses -T for this |
Examples
df -h
df -h .
df -k .
df -P .
df -hl
df -hY /
Notes
- df reports whole filesystems. To find which folder is using the space, follow up with du -h -d 1 on the full disk's mount point.
- Passing a file or folder, as in df -h ~/Documents, shows only the filesystem that holds it. It is a quick way to check one location.
- On macOS, -T filters by type and -Y prints the type column. On GNU/Linux, -T prints the type column and -t filters. A command copied between the two can fail or show the wrong thing.
- On modern macOS the main disk is split into several APFS volumes that share one pool of space. Several lines can show the same size and available figures, and the Used figure per line is only that volume's share.
- The Available figure can be smaller than Size minus Used. Filesystems may reserve space, and df reports what an ordinary user can actually use.
See also
Last reviewed 2026-10-07.