Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can get df results only for / partition. The partition name/identification (/dev/sda2, /dev/cciss/c0d0p1) could vary on different computers.

share|improve this question

1 Answer 1

up vote 10 down vote accepted

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).

share|improve this answer
    
I was searching for string "root" on the manpage... –  Radek Jul 12 '12 at 2: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 2:10
6  
Using 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 7:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.