bug-coreutils
[Top][All Lists]
Advanced

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

bug#10016: ls -lk is wrong


From: Alan Curry
Subject: bug#10016: ls -lk is wrong
Date: Fri, 11 Nov 2011 17:53:50 -0500 (GMT+5)

Jim Meyering writes:
> 
> I'm thinking of making -k comply, but letting any block-size
> specification (via --block-size= or an envvar) override that
> to give the behavior we've seen for the last 9 years.
> 

Wow, look what I stirred up.

If it's been like this for 9 years, it's been broken for 9 years. As I said
originally, BSD is the standard that matters here. It doesn't matter when or
even whether POSIX blessed the -k option.

Everywhere except GNU, this is simple. The size field of the ls -l output is
not defined in terms of blocks, so the block size setting doesn't affect it.

Numbers derived from st_blocks are reported in units of blocks, and others
aren't.

If you're going to define --block-size to have this effect, then you really
need to document it as being an option that does 2 separate things:
  1. sets the size of a block
  2. alters the definition of the -l format

-- 
Alan Curry





reply via email to

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