coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some options I would like to see on AIX


From: Bernhard Voelker
Subject: Re: Some options I would like to see on AIX
Date: Sun, 07 Jun 2015 18:07:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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

[Prev in Thread] Current Thread [Next in Thread]