How To Use df Command To List Filesystem Mount Points

| April 23, 2011

In Computer, storage device is a one of the main component of the Computer system. To install Operating system or to save data permanently storage device is required. In Linux you can use the some of the tools to monitor the disk usage like crusader, KDiskFree, Gnome Disk utility and df (disk free). It displays the amount of total and free disk space available on the mounted file systems. This command related to file system hence using this command we can find used blocks, inodes and free space available in the file system.

Syntax: – df [options] [name]

Example :

[root@mailserver ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 9448100 3549668 5418492 40% /

Options:-

-h If you this option –h, you will get out put in human readable( shows in terms of MB and GB) form

Example:-

[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 7.6G 1.9G 5.4G 26% /
tmpfs 478M 0 478M 0% /dev/shm

-i if you this option –i, you will get free available inodes, total inodes and %used inodes on mounted file system.

[root@localhost ~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 2050272 83601 1966671 5% /
tmpfs 122313 1 122312 1% /dev/shm

-T This options shows file system type of mounted file system.

Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 ext3 7936256 1920936 5605668 26% /
tmpfs tmpfs 489252 0 489252 0% /dev/shm

Another Example :

List nfs mount points using df command.

#df -HP -t nfs

Tags: , , , ,

Category: Linux Administration

Comments are closed.