Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need help in some linux commands regarding disk space.

When i see disk space using " df -h " it list all partitions with space left in percentage. But here are few things i need to know more .

  1. If i need to see which partition the particular dir is. For example if i want to see " /var/www/ " 's partition .

  2. And If i want to see how much space left in particular partition .

Thanks

share|improve this question

migrated from serverfault.com Jun 21 '10 at 5:27

This question came from our site for system and network administrators.

1 Answer 1

Just add the directory in question to the command line.

For instance df /home/dspillett will tell me the amount of space available on the partition mounted as /home (which happens to contain /home/dspillett).

df will derive which filesystem the named directory is within and show you space stats for that. You can also use df . to find the available/used/free space on the filesystem containing your current working directory, whatever that happens to be.

share|improve this answer

Your Answer

 
discard

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