How to Use the Linux Df Command to Calculate Disk Free Space
If you’re mostly a Windows user or programmer and are porting to linux, you may be thinking that a command that would help you determine the free disk space of your computer would be pretty useful. Luckily, there exists such a tool and is called DF (Display Free disk space).
To get information about the disk space on your system, you can just execute :
df -h
-h stands for Humanly readable, so it’s pretty easy to remember. Upon execution, you get back something like :
Filesystem Size Used Avail Capacity Mounted on /dev/disk0s2 113Gi 89Gi 23Gi 80% / ...
This example is generated on my macintosh pc, so it may defer in your case. As you can see, i have a total of 113GBytes on free space and i’m currently using 89GBytes (hmm, i have to free up some space). This leaves me with 23GBytes on available free disk space and thus i’m using 80% of the hard disk capacity.
























That’s not just logic. That’s really senbisle.