df (disk free) command is used to display disk usage of the file system. By default df command shows the file system usage in 1K blocks for all the current mounted file system, if you want to display the output of df command in human readable format , use -h option like “df -h”.
In this post we will discuss 11 different examples of ‘**df**‘ command in Linux
### Example:6 Display inodes information of file system. ###
‘**-i**’ option in df command is used to display inode information of the file system
inodes info of all the file system :
[root@linux-world ~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg00-root 1089536 22031 1067505 3% /
devtmpfs 192969 357 192612 1% /dev
tmpfs 194482 1 194481 1% /dev/shm
tmpfs 194482 420 194062 1% /run
tmpfs 194482 13 194469 1% /sys/fs/cgroup
/dev/mapper/vg00-home 960992 15 960977 1% /home
/dev/sda1 128016 337 127679 1% /boot
/dev/mapper/vg00-var 640848 1235 639613 1% /var
/dev/mapper/vg00-sap 960992 11 960981 1% /sap
[root@linux-world ~]#
inodes info of particular file system :
[root@linux-world ~]# df -i /sap/
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg00-sap 960992 11 960981 1% /sap
[root@linux-world ~]#
### Example:7 Print grant total space usage of all file system. ###
‘–total‘ option in df command is used to display the grant total of disk usage of all the file system.
[root@linux-world ~]# df -h --total
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg00-root 17G 786M 15G 5% /
devtmpfs 754M 0 754M 0% /dev
tmpfs 760M 0 760M 0% /dev/shm
tmpfs 760M 8.4M 752M 2% /run
tmpfs 760M 0 760M 0% /sys/fs/cgroup
/dev/mapper/vg00-home 15G 41M 14G 1% /home
/dev/sda1 477M 62M 387M 14% /boot
/dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var
/dev/mapper/vg00-sap 15G 37M 14G 1% /sap
total 58G 980M 54G 2% -
[root@linux-world ~]#
### Example:8 Print only Local file system space usage info. ###
Suppose network file system also mounted on linux box and but we want to display local file system information only, this can be achieved by using ‘-l‘ option in df command.
### Example:9 Print Disk Space information of particular file system type. ###
‘**-t**’ option in df command is used to print information of particular file system type, after ‘-t’ specify the file system type, example is shown below :
for ext4 :
[root@linux-world ~]# df -t ext4
Filesystem 1K-blocks Used Available Use% Mounted on