linux disc space
Tobiah
toby at tobiah.org
Fri Feb 15 14:01:21 EST 2008
DataSmash wrote:
> I simply want to capture the free disc space in a variable so that I
> can compare changes. I'm aware of a few commands like "df -h" or "du -
> k", but I can't figure out how to capture those values as a variable.
> I also looked at os.statvfs(), but that output doesn't seem to make
> any sense at all to me, knowing the size of the disc.
> Thanks for your help!
> R.D.
You could use the subprocess module to capture the output
of your disk usage commands.
--
Posted via a free Usenet account from http://www.teranews.com
More information about the Python-list
mailing list