How to find out the free disk space for a given path on a linux shell?

Michael Böckling picture Michael Böckling · Jan 26, 2009 · Viewed 44.4k times · Source

1) I am in some directory 2) I want to find out how much free space is left there

Is there a simple command that does this? I don't want to look in fstab or whatever, having to map the devices & mount points in my mind in order to determine how much free space I have left.

Answer

Joao da Silva picture Joao da Silva · Jan 26, 2009

Try df -h

Better yet: df -h . or df -h path-to-file