On 07/27/2012 08:00 AM, Bernhard Voelker wrote: > On 07/26/2012 06:11 PM, Pádraig Brady wrote: >> On 07/26/2012 04:43 PM, Bernhard Voelker wrote: >>> On 07/26/2012 04:23 PM, Pádraig Brady wrote: > >>>> So a full --output list supported by df could be >>>> FSTYPE,SOURCE,TARGET,SIZE,USED,AVAIL,FREEPCT > > Today, there's no FREEPCT, but USEDPCT. > I'd leave that.
Oops, right :) >> Oh right the last 4 items above should also have I... variants >> to cater for inodes. > > What about ISIZE, IUSED, IAVAIL and IUSEDPCT? Yes, that's what I was thinking. >>> We could for the first time have blocks and inodes statistics >>> in one command: >> >> Good point, but that could be allowed too with --output > > Right. > >>> And some directives could have mixed SIZE modifiers, e.g. >>> >>> %{SIZE}u used blocks with SIZE like KMGTPEZY. >>> %{SIZE}i inode number >>> >>> df --format="%Tt %Gu %Ki %m" >> >> T overlaps, but I see what you mean. > > The SIZE could be in {}, e.g. "%{T}t". > > How could we do this with --ouput? > Maybe something like: > > df --output=SIZE/M,IFREE/K,USED/1024,TARGET Too much control I think. Probably best leave the units globally controlled by -B and -h. > >> Would you still want to apply mbsalign to all fields >> but the last when using a specific format like this? > > No, the idea was to create format specifiers for that like > e.g. "%-FIELD" (left-aligned) and "%+FIELD" (right-aligned), > and to have the traditional formats be a certain combination > of it. > > This would need a lot of checking ... e.g. if a format string > contained a '+' or a '-', then what should happen with the > other fields? Error? Default alignment per field? Centered? > ... --format is more flexible and much more complex. >> 60:40 for --output as ordering/selection is needed by some >> 40:60 against --printf as detailed formatting is needed by few > > You see, I'm still jumping between --output and --format, now > also 60:40 pro --output. Marginal decisions like this are awkward. Thanks for taking the time to present possible options. > > What do the others think? > > Have a nice day, > Berny > cheers, Pádraig.