Re: Partition information as text file?
- Date: Fri, 1 Feb 2019 10:00:11 -0600
- From: David Wright <deblis@xxxxxxxxxxxxxxxxx>
- Subject: Re: Partition information as text file?
On Fri 01 Feb 2019 at 07:59:42 (-0600), Richard Owlett wrote:
> On 01/31/2019 02:03 PM, Thomas Schmitt wrote:
> > Hi,
> > 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.
> I'd make that statement stronger.
> My starting point was Gparted displays *ALL* the desired information
> for *ALL* members of the set [ /dev/sd* ] whether mounted or not.
I think you mean /dev/sdX*.
> That PROVED that what I wanted was possible.
We don't doubt that the information is obtainable. My concern was
whether you wanted a script to place the required information in
a file by COP,¹ or after the indeterminate amount of time it takes
to digest and regurgitate all that code. Fortunately the amount of
code you need to examine will be reduced by the fact that you
personally have a very limited group of partition types in your
> It's "suitability to purpose" was degraded on *2* counts:
> 1. it does not output the data as a text file.
> 2. it displays information for only 1 device at a time.
Yes, the thought of juggling several partition tables simultaneously
had probably not occurred to any sane person.
> > 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.
> Having known working source code for a program that almost meets my
> needs/desires remedies a major deficiency of the man page format --
> [/begin_rant almost total lack of examples /end_rant ;]
Have you tried pressing F1 in the gparted window itself?
I was under the impression that man pages were an aide-mémoire for CLI
users so that they don't have to commit all the options and arguments
to memory. Its flat-file format doesn't really lend itself to copious
examples, particularly where they would be trying to describe how to
navigate round a widget-filled picture.
But this dead horse has been flogged enough times on this list already.
Perhaps when your script is finished you could share it here. Many of
us are probably running systems with no more than ext & fat filesystems,
and could usefully employ it.
¹ Close of Play seems to be missing from wiki's Cop page, even though
it appears under End_of_day.