bug-coreutils
[Top][All Lists]
Advanced

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

bug#7042: df --help does not show `-m' option


From: Erik Auerswald
Subject: bug#7042: df --help does not show `-m' option
Date: Fri, 17 Sep 2010 11:47:14 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi,

On Fri, Sep 17, 2010 at 09:56:57AM +0100, Pádraig Brady wrote:
> On 16/09/10 23:34, Paul Eggert wrote:
> > If we're going to make incompatible changes, I suggest that
> > we solve the problem once and for all, by having "df" choose
> > the default blocksize dynamically, based on the size of the
> > output line describing the smallest disk.  For example, where
> > "df" currently outputs this:
> > 
> > Filesystem   1K-blocks      Used Available Use% Mounted on
> > /dev/sda1    11620338002   1437021 11618900981   1% /r/opt
> > /dev/sda2     20971520   1335871  19635650   7% /home/eggert
> > 
> > "df" would notice that the smallest file system is between 1GB and 1TB,
> > so it would default to 1 GB blocks, as follows:
> > 
> > Filesystem  1GB-blocks      Used Available Use% Mounted on
> > /dev/sda1      11900GB       2GB   11898GB   1% /r/opt
> > /dev/sda2         22GB       2GB      21GB   7% /home/eggert
> > 
> > This is much more useful as an output format, because one can visually
> > see which file systems are larger by seeing how many digits are there.
> > Contrast this to the output of df --si:
> > 
> > Filesystem     Size   Used  Avail Use% Mounted on
> > /dev/sda1       12T   1.5G    12T   1% /r/opt
> > /dev/sda2       22G   1.4G    21G   7% /home/eggert
> > 
> > which is harder to visually parse that way.

Yes, especially 1.5G of the 12T disk used looks a lot like 1.5T of 1.5T
used.

> That would break lots of scripts I'd say
> (they should use -P, but many don't).

That's obvious (all three points, sadly).

> In any case I don't think there is enough benefit
> in such a format change given the common wide range
> of device sizes attached to systems.

I like Paul's suggestion. Of course there are corner cases (mounting an
older USB stick with e.g. 128MB). The base could be selected by the
smallest mounted fixed disk.

Erik
-- 
[T]he essence of XML is this: the problem it solves is not hard,
and it does not solve the problem well.
                        -- The Essence of XML by Jérôme Siméon, Philip Wadler





reply via email to

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