[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] system interface for df info?



An easy way to find out:
strace df 2>&1 | less

You'll see that it opens /etc/mtab, and then performs an statfs64() on 
each mounted filesystem found there.

--Joe

Jim wrote:
> Where does df get its information?  I'd like to programatically  get the 
> same info without calling df.  I've looked at /proc but nothing jumped 
> out.  Obviously, df doesn't add up all the files to get "used" space, 
> 'cause it doesn't take that long.