df
-
- Display the output of df command in human readable format
- Display ouput in human readable format for local storage only (no remote storage such as NFS)
- Display inode information of the file system
- Find the top 20 inode consumers (of var):
- List disk usage of all the file systems using ‘-a’
- Print file system type of all mounted file systems
- Print disk usage of file systems in block-size
Summary
The df command may be used to check disk space.
Usage Examples
Display the output of df command in human readable format
The below command will print the sizes of a machine’s disks in human readable format (e.g. 1K, 234M, 2G)
# df -hDisplay ouput in human readable format for local storage only (no remote storage such as NFS)
# df -h -lDisplay inode information of the file system
# df -iFind the top 20 inode consumers (of var):
# find /var -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -nr | head -n 20List disk usage of all the file systems using ‘-a’
# df -aPrint file system type of all mounted file systems
# df -TPrint disk usage of file systems in block-size
# df -k