GNU bug report logs - #10016
ls -lk is wrong

Previous Next

Package: coreutils;

Reported by: "Alan Curry" <pacman-cu <at> kosh.dhis.org>

Date: Fri, 11 Nov 2011 00:04:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: jim <at> meyering.net (Jim Meyering)
Cc: 10016 <at> debbugs.gnu.org
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




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.