GNU bug report logs -
#10016
ls -lk is wrong
Previous Next
Full log
View this message in rfc822 format
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
This bug report was last modified 13 years and 254 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.