Main Menu

Search

LINUX: "df" Command To Find FileSystem / Partition To Which Directory or File Belongs (How To Doc)

Below "df" Command can be used to find the FileSystem / Partition to which directory or file belongs.
df -HT <filename or directory>

For e.g. if you run above df command on /testshare/file-test.out file as follows and lets assume /testshare/file-test.out is file in NFS share.
df -HT /testshare/file-test.out

You will see output as follows which indicates that file-test.out belongs to testshare which is NFS mount.

# df -HT /testshare/file-test.out

Filesystem    Type     Size   Used  Avail Use% Mounted on
10.10.10.5:/export/common/test
               nfs     1.1T   593G   480G  56% /testshare

For e.g. if you run df command on /tmp, you will see output as follows as /tmp is local filesystem.

# df -HT /tmp
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sda2      ext3  8.4G  4.3G  3.6G  55% /



Products to which Article Applies

All Linux Operating Systems



tarun boyella


No comments:

Post a Comment