Subject: Re: bug#49994: upgrade: have "-s" of 'ls' display alloc'd sizes for specified "--block-size"

From: L A Walsh <[email-masked]>
Date: Sun, 15 Aug 2021 16:13:12 -0700

(reposting w/list+bugdb)

Hmm...  for libc.so, ls -l shows 253 bytes
for -s, it shows '4' 
and w/block-size=1, it shows
4096...

My LS_OPTIONS is
LS_OPTIONS=-N --color=tty -T 0

-N for quoting and -T for no tabs

my version: rpm -qf /usr/bin/ls
coreutils-8.23-2.3.2.x86_64

may not be as current as yours, but it would be odd if it changed and
you didn't know...

Ishtar:/usr/lib64> command ls -lgG libc.so
-rw-r--r-- 1 253 Mar 11 11:22 libc.so
Ishtar:/usr/lib64> command ls -s libc.so
4 libc.so
Ishtar:/usr/lib64> command ls --block-size=1 -s libc.so
4096 libc.so

On 2021/08/11 00:40, Paul Eggert wrote:
> On 8/10/21 11:56 PM, L A Walsh wrote:
>> Perhaps the '-s' option in ls could pay attention to
>> the user-specified block-size?
> 
> Doesn't it already do that?
> 
> $ ls -s libc.so
> 12192 libc.so
> $ ls -s --block-size=1 libc.so
> 12484608 libc.so

On 2021/08/11 00:40, Paul Eggert wrote:
> On 8/10/21 11:56 PM, L A Walsh wrote:
>> Perhaps the '-s' option in ls could pay attention to
>> the user-specified block-size?
> 
> Doesn't it already do that?
> 
> $ ls -s libc.so
> 12192 libc.so
> $ ls -s --block-size=1 libc.so
> 12484608 libc.so