Subject: Re: du(1) with gigabyte option.
To: gabriel rosenkoetter <gr@eclipsed.net>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-userlevel
Date: 02/25/2003 21:16:22
On Tue, 18 Feb 2003, gabriel rosenkoetter wrote:

> > 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)).

Uhm, if we're talking stat blocks (block number in the stat struct),
blocks * 2 / (1024 * 1024) == "1024*1024 bytes". Stat blocks are defined
as being 512-byte entities, regardless of the underlying device.

Take care,

Bill