0

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

1 Answer 1

8

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.

You must log in to answer this question.