[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k
From: |
Eric Blake |
Subject: |
bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k? |
Date: |
Sat, 01 Jun 2013 18:34:06 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
On 06/01/2013 03:54 PM, Linda Walsh wrote:
> I know the "-h" displays sizes using variable units,
> but if I want to have it display all of the sizes in terms
> of 'K' or 'M' or (not likely useful, but 'G' or 'T'), how
> do I do it?
'ls --block-size=1k' or 'ls --block-size=1M'
> If 'k' doesn't have it, does posix mandate that the user can't
> choose what unit to display things in?
POSIX can only mandate what portable uses are limited to. You are
correct that there is no portable way, via POSIX options alone, to make
ls change what units it displays in, other than what POSIX requires of
'-k' (which affects only the -s column and the per-directory summary).
But POSIX does not (and cannot) mandate against extensions, and we have
not removed any of coreutils' extensions - we merely removed -k as a
synonym of the extension --block-size=..., because the POSIX
specification of -k is incompatible with the --block-size= extension
semantics that we did not change. If you think there is an extension
missing in ls to display something that you need, feel free to write a
patch to provide that extension - we have long desired to have a
--format option that would let you choose which pieces of information to
display and in what order.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Linda Walsh, 2013/06/01
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Pádraig Brady, 2013/06/01
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Linda A. Walsh, 2013/06/01
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Paul Eggert, 2013/06/01
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Linda Walsh, 2013/06/01
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?,
Eric Blake <=
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Linda Walsh, 2013/06/01
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Paul Eggert, 2013/06/02
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Linda Walsh, 2013/06/02
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Eric Blake, 2013/06/04
- bug#14525: ls -k produced no size, ls -lk lists in bytes? What's up w/k?, Linda Walsh, 2013/06/06