df

>Usage

The df command displays statistics about the free space in a specified file system (or all file systems by default). It shows information such as used space, available space, and percentage of usage, along with additional details. By default, block sizes are set to 512 bytes, so each file's size is calculated in multiples of 512 bytes. This default block size can be adjusted using specific options.

>Synopsis

df [option] <filesystems>

>Options

-h

Show sizes in a human-readable format (e.g., KB, MB, GB).

Example 1:

Dots

-zsh

df -h <filesystems>


Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk3s5 926Gi 172Gi 731Gi 20% 1529228 7668433840 0% /System/Volumes/Data

-a

Includes pseudo, duplicate, and inaccessible file systems in the output.

Example 2:

Dots

-zsh

df -a <filesystems>


Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk3s5 1942700360 360821656 1533666448 20% 1529200 7668332240 0% /System/Volumes/Data

-i

Lists inode information instead of block usage. inode (index node) is a data structure in a Unix-style file system.

Example 3:

Dots

-zsh

df -i <filesystems>


Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk3s5 1942700360 360803992 1533684112 20% 1529218 7668420560 0% /System/Volumes/Data

-l

Limits listing to local file systems.

Example 4:

Dots

-zsh

df -l <filesystems>


Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk3s5 1942700360 360796024 1533692080 20% 1529219 7668460400 0% /System/Volumes/Data

-k

Displays disk usage with sizes shown in kilobytes (KB).

Example 5:

Dots

-zsh

df -k <filesystems>


Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk3s5 971350180 180399120 766844932 20% 1529220 7668449320 0% /System/Volumes/Data

>Quiz

Progress: Question ? out of ?

Question Title

Page written by Cheney Zhang