bug-coreutils
[Top][All Lists]
Advanced

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

bug#13902: BUG : Option -k / --kibibytes no longer works with ls


From: Eric Blake
Subject: bug#13902: BUG : Option -k / --kibibytes no longer works with ls
Date: Fri, 08 Mar 2013 06:06:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3

tag 13902 notabug
thanks

On 03/08/2013 01:09 AM, Sebastien wrote:
> Hi,
> 
> This is to tell you that option -k (--kibibytes) no longer works with
> the ls command.

Thanks for the report.  However, according to NEWS, this was a bug fix
of coreutils 8.15:

  ls's -k option no longer affects how ls -l outputs file sizes.
  It now affects only the per-directory block counts written by -l,
  and the sizes written by -s.  This is for compatibility with BSD
  and with POSIX 2008.  Because -k is no longer equivalent to
  --block-size=1KiB, a new long option --kibibyte stands for -k.
  [bug introduced in coreutils-4.5.4]

> 
> Sample output:
> 
> $ ls -l
> total 81644
> drwxrwxr-x. 23 root root     4096 Dec  3 20:22 linux-3.7-rc8
> -rw-rw-r--.  1 seb  seb  83581254 Dec  5 21:26 linux-3.7-rc8.tar.bz2
> drwx------.  2 root root    16384 May  9  2012 lost+found
> 
> $ ls -lk
> total 81644
> drwxrwxr-x. 23 root root     4096 Dec  3 20:22 linux-3.7-rc8
> -rw-rw-r--.  1 seb  seb  83581254 Dec  5 21:26 linux-3.7-rc8.tar.bz2
> drwx------.  2 root root    16384 May  9  2012 lost+found

This is the correct behavior required by POSIX when using 'ls -k'.  You
were relying on an alternate behavior, where it was a bug that -k
exposed the alternate behavior; but that alternate behavior is still
available to you if you use the proper spelling:

ls -l --block-size=k

Therefore, I'm closing this as not a bug.  Feel free to add further
comments or questions.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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