Subject: Re: du(1) with gigabyte option.
To: Mattias Karlsson <keihan@sergei.cc>
From: None <cgd@broadcom.com>
List: tech-userlevel
Date: 02/18/2003 09:25:39
At Tue, 18 Feb 2003 18:20:36 +0100, Mattias Karlsson wrote:
> > * do other implementations do this?

you didn't answer this.


> > so, really, the question is, why _should_ we do it, rather than "it's
> > fine as is."
> 
> Easy scripting... You don't need to set BLOCKSIZE, as with -m

Uh, in my world, "easy scripting" means:

* creating scripts that are portable, and

* knowing, when you're scripting, which options you should use and
  where they should work.

As far as I can tell, not even GNU 'du' has a -g option.


"BLOCKSIZE=xxx du ..."  is much more portable -- easier by the points
above, too -- than du -g.

"du ..." then some expression assuming 512 byte blocks is probably
even more portable.

It's not substantially more difficult to do _any_ of these conversions
in a script.  If this is for scripting's sake then IMO it's not just
"not a good idea" it's a fairly bad one.



cgd