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

Filesystemname of partition or filesystem
Sizesize of the partition (in 1K blocks)
Usedmemory allocated to the filesystem (in 1K blocks)
Availablememory available to the filesystem (in 1K blocks)
Use %use memory in percentage by using the below formula:
{space used}/({space used} + {space free})
Mounted onfile 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

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

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.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

10 Blockchain Security Vulnerabilities OWASP API Top 10 - 2023 7 Facts You Should Know About WormGPT OWASP Top 10 for Large Language Models (LLMs) Applications Top 10 Blockchain Security Issues