Disc space on a floppy disc 
Author Message
 Disc space on a floppy disc

Hi!

Is there any possibility for python under Linux to test how much disc
space on a floppy disc is free (except by parsing the output of the "df"
command)?

Thanks,
FFH



Tue, 22 Jun 2004 01:10:11 GMT  
 Disc space on a floppy disc

Quote:

> Hi!

> Is there any possibility for python under Linux to test how much disc
> space on a floppy disc is free (except by parsing the output of the "df"
> command)?

There is os.statvfs() function and constants of statvfs
to interpret results of os.statvfs call.

For example:

Quote:
>>> print os.statvfs("/boot")

(1024, 1024, 23333, 13088, 11884, 6024, 5988, 5988, 0, 255)
Quote:
>>> os.system("df")

Filesystem           1k-blocks      Used Available Use% Mounted on
...
/dev/hda4                23333     10245     11884  46% /boot
...

(please, not that available space is not all space that is
available. Usually 5% are reserved for root on ext2 filesystems.
Not sure about floppies.)

Sincerely yours, Roman A.Suzi
--



Tue, 22 Jun 2004 00:31:04 GMT  
 Disc space on a floppy disc

Quote:
> Hi!

> Is there any possibility for python under Linux to test how much disc
> space on a floppy disc is free (except by parsing the output of the
> "df" command)?

Does os.statvfs help?  (I don't know, but it might).

Cheers,
M.

--
  I'm okay with intellegent buildings, I'm okay with non-sentient
  buildings. I have serious reservations about stupid buildings.
     -- Dan Sheppard, ucam.chat (from Owen Dunn's summary of the year)



Tue, 22 Jun 2004 01:07:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Windows ME and floppy-disc write problem

2. Floppy disc controller - data without DMA?

3. Floppy Disc

4. How to get disc space info ?

5. How much disc space for Tcl/Tk/TclX?

6. Can anybody send me SAMPLE.LIF from 2nd installation disc

7. Hard disc serial number

8. compact disc logo

9. eiffel 4.4 - PC Plus magazine disc

10. Disc Garbage from Modula 2?

11. Beginner needs to write to a hard disc

12. Disc sector number from filename?

 

 
Powered by phpBB® Forum Software