How can get df results only for / partition. The partition name/identification (/dev/sda2, /dev/cciss/c0d0p1) could vary on different computers.
Asked
Active
Viewed 1.2k times
5
1 Answers
15
You can specify a directory or file on command line and the file system that contains that file/directory.
$ df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 63579860 22097564 38297452 37% /
You can read more on the manpage, df(1).
Arcege
- 22,287
- 5
- 56
- 64
-
I was searching for string "root" on the manpage... – Radek Jul 12 '12 at 02:00
-
What's the point of using directory name with df? If we exclude my original question, what could be another reason to use directory or even file name with df? – Radek Jul 12 '12 at 02:10
-
6Using df with a directory (or filename) is handy if you want to know how much data (approximately) you can store into specific directory without being interested what block device it belongs to. Imagine you have e.g. some media library mounted over NFS: then you can just 'df /mnt/media_lib'. – Petr Uzel Jul 12 '12 at 07:22