Monitoring and display disk space usage using df command.

Monitoring and display
disk space usage using df command.

The df command can
be use to display the disk space usage statistic, the df command
also display
the mounted filesystem and disk space that have been used and free space
available on your Linux operating system.. The df command will gather and summarize
important statistic about all currently mounted filesystems. The df
command is easy to use and usually use to check free space on your hard
disk drive, for example;

To get a listing of free
space on all mounted filesystems execute df command with no
arguments.

[root@fedoracore ~]# df

Filesystem
1K-blocks UsedAvailable Use% Mounted on

/dev/mapper/VolGroup00-LogVol00
33423168 1656089215137044
53% /

/dev/sda1
101086 1495280915
16% /boot

tmpfs
257560 0257560 0% /dev/shm

[root@fedoracore ~]#

Use the df command with
-h option to displays the space in human-readable units , the
example below show the freespace available in Mb unit:

[root@fedoracore ~]# df
-h

Filesystem
Size UsedAvail
Use% Mounted on

/dev/mapper/VolGroup00-LogVol00
32G 16G15G
53% /

/dev/sda1
99M 15M80M
16% /boot

tmpfs 252M
0252M 0% /dev/shm

[root@fedoracore ~]#

Note: The Use% column shows what percentage of the filesystem
that
currently in use.

To show
space on the filesystems those
directories are mounted on:

[root@fedoracore ~]# df
/boot

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/sda1 101086 14952 80915 16% /boot

[root@fedoracore ~]#

The df command can be use
to get information on inode usage on all mounted filesystem.
To show the inode information execute df command with the (
-i )
option:

[root@fedoracore ~]# df -i

Filesystem Inodes IUsed IFree IUse% Mounted on

/dev/mapper/VolGroup00-LogVol00
8633856 313455 8320401 4% /

/dev/sda1 26104
37 26067 1% /boot

tmpfs 64390 1 64389 1% /dev/shm

[root@fedoracore ~]#

The following are some of the flags and arguments that can be used for the
df command: