Thanks. Also good to know.

On Sun, Jun 7, 2015 at 6:07 PM, Bernhard Voelker <[email protected]>
wrote:

> On 06/06/2015 01:50 PM, Michael Felt wrote:
> > I would never consider asking that the layout of the columns be changed.
>
> You don't need - GNU df already has such an option ;-)
>
> `--output'
> `--output[=FIELD_LIST]'
>      Use the output format defined by FIELD_LIST, or print all fields if
>      FIELD_LIST is omitted.  In the latter case, the order of the
>      columns conforms to the order of the field descriptions below.
>
>      The use of the `--output' together with each of the options `-i',
>      `-P', and `-T' is mutually exclusive.
>
>      FIELD_LIST is a comma-separated list of columns to be included in
>      `df''s output and therefore effectively controls the order of
>      output columns.  Each field can thus be used at the place of
>      choice, but yet must only be used once.
>
>      Valid field names in the FIELD_LIST are:
>     `source'
>           The source of the mount point, usually a device.
>
>     `fstype'
>           File system type.
>
>     `itotal'
>           Total number of inodes.
>
>     `iused'
>           Number of used inodes.
>
>     `iavail'
>           Number of available inodes.
>
>     `ipcent'
>           Percentage of IUSED divided by ITOTAL.
>
>     `size'
>           Total number of blocks.
>
>     `used'
>           Number of used blocks.
>
>     `avail'
>           Number of available blocks.
>
>     `pcent'
>           Percentage of USED divided by SIZE.
>
>     `file'
>           The file name if specified on the command line.
>
>     `target'
>           The mount point.
>
>      The fields for block and inodes statistics are affected by the
>      scaling options like `-h' as usual.
>
>      The definition of the FIELD_LIST can even be split among several
>      `--output' uses.
>
>           #!/bin/sh
>           # Print the TARGET (i.e., the mount point) along with their
> percentage
>           # statistic regarding the blocks and the inodes.
>           df --out=target --output=pcent,ipcent
>
>           # Print all available fields.
>           df --o
>
>
> Have a nice day,
> Berny
>

Reply via email to