Subject: Re: du(1) with gigabyte option.
To: None <tech-userlevel@netbsd.org>
From: gabriel rosenkoetter <gr@eclipsed.net>
List: tech-userlevel
Date: 02/18/2003 17:31:50
--A6N2fC+uXW/VQSAv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Feb 18, 2003 at 11:19:12PM +0100, Mattias Karlsson wrote:
> * It's new and not used on Solaris / GNU, which doesn't make it
> portable to these.  Although, if you're doing a script that must be
> portable, you always have to check if the option(s) is available on
> the targets, which doesn't make this a problem really.

Yes and no. But that argument goes against having -m to begin with.

And yet, -k *is* portable to every Unix-like OS I've ever used,
which is far from a complete set, but...

> * It won't interfere with other unices since they don't have this
> option. Well, until they add -g to do something else.  Then we would
> be facing the same problem like "ls -g" on different unices.

Guh.

> * Makes sense since we have -m.  And -h is not enough.

Likewise, it makes sense to add up to what's definied (-t, -p, et
cetera). Do we really want this? Is there really a *good* reason to
pollute the available switch name space?

> * Well, you do not have to calculate/set BLOCKSIZE, of course.

Bleh. Not a great argument, imho.

> Well, I guess -g *could* also be used on df(1), but Solaris for example,
> uses df -g to print the entire statvfs(2) structure.

Ugh. And here we run into conflicts already, because our df(1) does
have a -m, and it displays in megabytes (defined as "1024*1024 bytes",
if you believe the man page, but probably actually in blocks * 2 /
(1024 * 1024)).

> A terabyte option, -t would cause problem with df(1) too, -t is used on
> both Solaris and NetBSD already.

Ugly!

> So, perhaps there's too much problems/collisions with all this...

I'd agree. -g might be nice... but I'd end up never using it. And so
far you and I are the only two posters on tech-userlevel to even
think it might be nice.

Maybe worth it as a local patch if you really dig it, but it sounds
like maybe not the best thing to commit.

--=20
gabriel rosenkoetter
gr@eclipsed.net

--A6N2fC+uXW/VQSAv
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (NetBSD)

iD8DBQE+UrRW9ehacAz5CRoRAkuEAJ93MMenlQ2uKXNE/oFb5u8nYa80fgCfRjfm
BOuT4mmJzykgzwgCLp30BdI=
=URW8
-----END PGP SIGNATURE-----

--A6N2fC+uXW/VQSAv--