From unknown Sat Aug 16 10:46:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13902 <13902@debbugs.gnu.org> To: bug#13902 <13902@debbugs.gnu.org> Subject: Status: BUG : Option -k / --kibibytes no longer works with ls Reply-To: bug#13902 <13902@debbugs.gnu.org> Date: Sat, 16 Aug 2025 17:46:20 +0000 retitle 13902 BUG : Option -k / --kibibytes no longer works with ls reassign 13902 coreutils submitter 13902 Sebastien severity 13902 normal tag 13902 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 03:11:35 2013 Received: (at submit) by debbugs.gnu.org; 8 Mar 2013 08:11:35 +0000 Received: from localhost ([127.0.0.1]:38059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDsOp-0006VP-6b for submit@debbugs.gnu.org; Fri, 08 Mar 2013 03:11:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49812) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDsNm-0006Tf-Mo for submit@debbugs.gnu.org; Fri, 08 Mar 2013 03:10:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDsN2-0008Tb-FI for submit@debbugs.gnu.org; Fri, 08 Mar 2013 03:09:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDsN2-0008TX-Cb for submit@debbugs.gnu.org; Fri, 08 Mar 2013 03:09:40 -0500 Received: from eggs.gnu.org ([208.118.235.92]:32924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDsMy-0000cN-7q for bug-coreutils@gnu.org; Fri, 08 Mar 2013 03:09:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDsMt-0008Rg-Hs for bug-coreutils@gnu.org; Fri, 08 Mar 2013 03:09:36 -0500 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:30478 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDsMt-0008RT-Bd for bug-coreutils@gnu.org; Fri, 08 Mar 2013 03:09:31 -0500 Received: from [192.168.1.13] ([90.35.67.31]) by mwinf5d40 with ME id 8w9Q1l00P0gUCgy03w9Up5; Fri, 08 Mar 2013 09:09:29 +0100 Message-ID: <51399CB4.5030209@orange.fr> Date: Fri, 08 Mar 2013 09:09:24 +0100 From: Sebastien User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: BUG : Option -k / --kibibytes no longer works with ls Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 08 Mar 2013 03:11:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi, This is to tell you that option -k (--kibibytes) no longer works with the ls command. 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 Tested on: Fedora 18 "Spherical Cow" with ls (GNU coreutils) 8.17. Regards, -- Sebastien GODARD sebastien.godard@orange.fr From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 08:07:11 2013 Received: (at control) by debbugs.gnu.org; 8 Mar 2013 13:07:11 +0000 Received: from localhost ([127.0.0.1]:38463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDx0t-0005wl-1W for submit@debbugs.gnu.org; Fri, 08 Mar 2013 08:07:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39189) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDx0j-0005vu-D4; Fri, 08 Mar 2013 08:07:02 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r28D6IbS013966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Mar 2013 08:06:18 -0500 Received: from [10.3.113.126] (ovpn-113-126.phx2.redhat.com [10.3.113.126]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r28D6HNl005605; Fri, 8 Mar 2013 08:06:18 -0500 Message-ID: <5139E249.5090704@redhat.com> Date: Fri, 08 Mar 2013 06:06:17 -0700 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 MIME-Version: 1.0 To: Sebastien Subject: Re: bug#13902: BUG : Option -k / --kibibytes no longer works with ls References: <51399CB4.5030209@orange.fr> In-Reply-To: <51399CB4.5030209@orange.fr> X-Enigmail-Version: 1.5.1 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2KFCXDPQPOCILURIUFHVM" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: control Cc: 13902-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.5 (-------) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2KFCXDPQPOCILURIUFHVM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 13902 notabug thanks On 03/08/2013 01:09 AM, Sebastien wrote: > Hi, >=20 > 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=3D1KiB, a new long option --kibibyte stands for -k. [bug introduced in coreutils-4.5.4] >=20 > Sample output: >=20 > $ 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 >=20 > $ 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=3Dk Therefore, I'm closing this as not a bug. Feel free to add further comments or questions. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2KFCXDPQPOCILURIUFHVM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJROeJJAAoJEKeha0olJ0NqzRoIAKXsAzFiNMlUjciFgdratWLT 8kaAdojTBZpD9vhPC9sDcIiQm8l/P4PZCo20wsDuBsZvcKK0eOzEmyRjbI3Na2ex aAMvcxasktvN02lXAZII30cwDZxV2NF+6fTGuxmpCMHltpe5xcZCYVqzwRd4KDoV n8LAjN1v9UGslEcS/Gpcs328y6Rt02V/AMne0jYSiQL9o1zKEprvk3RGqYNg+EbN 0f0KsVfBdB2BPn4ERgInA/L/6PLtV2qjmRJfb9lBseNPF4pCu623PqjSO68quvaG VuGRpWDPjzWWsMqd3QhvjjtzXDa/OIlkzij7Fq5acK850VE4qyLHcSyC4YORFs0= =NDVk -----END PGP SIGNATURE----- ------enig2KFCXDPQPOCILURIUFHVM-- From unknown Sat Aug 16 10:46:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 06 Apr 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator