bug-coreutils
[Top][All Lists]
Advanced

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

Re: df & du should honor $BLOCKSIZE


From: Paul Eggert
Subject: Re: df & du should honor $BLOCKSIZE
Date: 22 Feb 2004 22:33:22 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

address@hidden (Peter Seebach) writes:

>      BLOCKSIZE        The size of the block units used by several commands,
>                       most notably df(1), du(1) and ls(1).

Can you find a complete list of BSD programs that use getbsize,
and which contexts they use it in?

Here's why I'd like to know the details.  OpenBSD 3.2 'ls' treats
BLOCKSIZE differently than coreutils-5.2.0 'ls' treats BLOCK_SIZE.
The latter affects the st_size column, but the former doesn't.  (See
below.)  So, even if we make BLOCK_SIZE default to BLOCKSIZE, the
emulation won't be quite right for "ls".  I'm worried that there are
other problems in other programs.

----- coreutils 5.2.0 -----
$ BLOCK_SIZE=512 ls -sl
total 1072
1072 -rw-rw-r--  2 eggert eggert 1045 Mar 19  2003 113277-05.zip
$ BLOCK_SIZE=1024 ls -sl
total 536
536 -rw-rw-r--  2 eggert eggert 523 Mar 19  2003 113277-05.zip

----- OpenBSD 3.2 -----
$ BLOCKSIZE=512 /bin/ls -sl
total 1072
1072 -rw-rw-r--  2 eggert  eggert  534737 Mar 19  2003 113277-05.zip
$ BLOCKSIZE=1024 /bin/ls -sl
total 536
 536 -rw-rw-r--  2 eggert  eggert  534737 Mar 19  2003 113277-05.zip




reply via email to

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