df
Command Cheatsheet
The df
command in Unix-like systems is used to display information about disk space usage. It provides details on disk space usage for mounted filesystems. Here’s a quick reference guide:
Basic Syntax
df [OPTION]... [FILE]...
Common Options
-h
,--human-readable
: Print sizes in a human-readable format (e.g., KB, MB, GB).df -h
-T
,--print-type
: Print filesystem type.df -T
-i
,--inodes
: Display inode usage instead of block usage.df -i
-a
,--all
: Include all filesystems, including those with 0 blocks.df -a
-t TYPE
,--type=TYPE
: Limit listing to filesystems of type TYPE (e.g., ext4, nfs).df -t ext4
Examples
Display disk space usage in human-readable format:
df -h
Show filesystem type along with usage:
df -T
Display inode usage instead of block usage:
df -i
Include all filesystems, even those with 0 blocks:
df -a
Limit listing to specific filesystem type (e.g., ext4):
df -t ext4
Additional Information
Help option:
df --help
View manual page for
df
:man df
The df
command is essential for monitoring disk space usage on Unix-like systems, providing detailed information about mounted filesystems. For more detailed options and usage scenarios, refer to the man
page or use df --help
.