[Tutor] df type function in python

Spencer Parker inthefridge at gmail.com
Wed Jan 7 19:08:52 CET 2009

Is there anyway to get rid of the header information?  I just want the
output that it gives me for the device.

On Wed, Jan 7, 2009 at 11:02 AM, Stuart Sears <stuart at sjsears.com> wrote:

> On 07/01/09 16:42, Spencer Parker wrote:
>> I am looking for a function in python that would operate similar to df.
>>  I would use df, but I am unable to parse the data that it gives me
>> from there. If it would give me a single line I could then split it out
>> if I needed to, but I can't see how to actually do that. What I am
>> trying to do is get some information on a drive I have mounted. I have a
>> disk image that I have mounted on temp folder that I need to see how
>> much total pace it is taking up. It gives me a more accurate
>> representation of my xen disk images that just an ls -sk or something on
>> the file.
> Which version of df do you have? Which OS is this on?
> If you want one line per device/mountpoint, df -P will do so on linux
> systems nowadays. I have no idea whether any of this has been ported across
> to other *NIX systems.
> Regards,
> Stuart
> --
> Stuart Sears RHCA etc.
> "It's today!" said Piglet.
> "My favourite day," said Pooh.

Spencer Parker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090107/2ce5ecb7/attachment.htm>

More information about the Tutor mailing list