Linux df Command with 10 Practical Examples
Linux df command is used for showing the free disk space of a particular file system on Linux or Unix-based systems. You can display summarize information of the filesystem by just entering "df". In simple words, program df helps in getting information on any hard disks or mounted devices that includes CD, DVD, and flash drives. This blog covers Linux df Command with 10 Practical Examples.
- Output format
- Linux df Command with 10 Practical Examples
- (2) Include every information related to the file system that includes duplicate, pseudo, and inaccessible entries
- (3) To display human-readable output
- (4) Exclude file system with small size and mention the total at the end
- (5) Display the type of filesystem with other details
- (6) Display information on the specific location
- (7) Combine two options in one query
- (8) Display all information related to the file system and usage show in 1K blocks
- (9) List Inodes information
- (10) Display all available options - Help
- Conclusion
Output format
Filesystem | name of partition or filesystem |
Size | size of the partition (in 1K blocks) |
Used | memory allocated to the filesystem (in 1K blocks) |
Available | memory available to the filesystem (in 1K blocks) |
Use % | use memory in percentage by using the below formula: {space used}/({space used} + {space free}) |
Mounted on | file system location or directory where a file system resides |
Linux df Command with 10 Practical Examples
(1) Basic Example - Display information related to all available filesystem
By default, program df shows disk space in 1K blocks. Just remember one thing, if you are not passing any argument, it will display information on all currently mounted file systems.
df
(2) Include every information related to the file system that includes duplicate, pseudo, and inaccessible entries
df -a
(3) To display human-readable output
df -h
(4) Exclude file system with small size and mention the total at the end
df --
total
(5) Display the type of filesystem with other details
df -T
(6) Display information on the specific location
df -T /run
(7) Combine two options in one query
df -Th
(8) Display all information related to the file system and usage show in 1K blocks
df -k
(9) List Inodes information
df -i
(10) Display all available options - Help
df --
help
Conclusion
This blog covers the Linux program "df" with practical 10 examples that you can use while accessing Linux file systems information.
Subscribe us to receive more such articles updates in your email.
If you have any questions, feel free to ask in the comments section below. Nothing gives me greater joy than helping my readers!
Disclaimer: This tutorial is for educational purpose only. Individual is solely responsible for any illegal act.