How to check disk space usage using df command

The “df” command is used to view the disk space usage information of your file systems. I have posted 5+ awesome df commands.

Example-1:To Check File System Disk Space Usage

The “df” command displays the disk space usage, like file systems, mount points, total blocks, total disk space, used disk space, available disk space and their mount points.


[email protected] [~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2            940116140 133889620 757700984  16% /
/dev/sda1               101086     18263     77604  20% /boot
tmpfs                 16474932         0  16474932   0% /dev/shm
/dev/sdb1            961432072 293232004 619362068  33% /home2
/usr/tmpDSK            4128448    142252   3776484   4% /tmp
[email protected] [~]#

Example-2:To Check all File System Disk Space Usage
The “df -a” command displays the information of “All” disk space usage, like used & dummy file systems.

[email protected] [~]# df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2            940116140 133889632 757700972  16% /
proc                         0         0         0   -  /proc
sysfs                        0         0         0   -  /sys
devpts                       0         0         0   -  /dev/pts
/dev/sda1               101086     18263     77604  20% /boot
tmpfs                 16474932         0  16474932   0% /dev/shm
/dev/sdb1            961432072 293232004 619362068  33% /home2
none                         0         0         0   -  /proc/sys/fs/binfmt_misc
/usr/tmpDSK            4128448    142252   3776484   4% /tmp
/tmp                   4128448    142252   3776484   4% /var/tmp
[email protected] [~]#

Example-3:To Show Disk Space Usage in Human Readable Format
The “df -h” command displays the information of disk space usage with “Human Readable Format”.

[email protected] [~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             897G  128G  723G  16% /
/dev/sda1              99M   18M   76M  20% /boot
tmpfs                  16G     0   16G   0% /dev/shm
/dev/sdb1             917G  280G  591G  33% /home2
/usr/tmpDSK           4.0G  139M  3.7G   4% /tmp
[email protected] [~]#

Example-4:To Show File System Inodes
The “df -i” command displays the information of File System Inodes and their percentage.

[email protected] [~]# df -i
Filesystem              Inodes   IUsed     IFree IUse% Mounted on
/dev/sda2            242647040 7560252 235086788    4% /
/dev/sda1                26104      41     26063    1% /boot
tmpfs                  4118733       1   4118732    1% /dev/shm
/dev/sdb1            122109952 1833286 120276666    2% /home2
/usr/tmpDSK             524288    1121    523167    1% /tmp
[email protected] [~]#

Example-5:To Show File System Type
The “df -T” command displays the information of File System type and their percentage.

[email protected] [~]# df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/sda2     ext3   940116140 133893364 757697240  16% /
/dev/sda1     ext3      101086     18263     77604  20% /boot
tmpfs        tmpfs    16474932         0  16474932   0% /dev/shm
/dev/sdb1     ext3   961432072 293232004 619362068  33% /home2
/usr/tmpDSK   ext3     4128448    141908   3776828   4% /tmp
[email protected] [~]#

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...