Web lists-archives.com

Re: Partition information as text file?


Richard Owlett wrote:
> > > What bugs me is Gparted [though it does not output text]  reports
> > > used/unused space on each partition/file system.

i wrote:
> > [...] Gparted runs external programs, which a simple
> > shell script could do too.

David Wright wrote:
> So going back to the OP, is this a sensible approach to choose instead
> of letting mount and df figure things out for themselves?

It's what Gparted does and what Richard mentioned as example of the desired
information. Given that the source code of Gparted is published, we do not
have to speculate how it does this, but rather can riddle over its C++ code.

(The ext2 specific code distinguishes between mounted and not mounted
 partitions. The FAT related code seems not to do.)

Have a nice day :)