coreutils
[Top][All Lists]
Advanced

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

Re: suggestion for 'ls' coreutil, comma'd filesizes in -l output


From: Eric Blake
Subject: Re: suggestion for 'ls' coreutil, comma'd filesizes in -l output
Date: Tue, 04 Jun 2013 14:35:33 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 06/04/2013 02:24 PM, Bob Proulx wrote:
> 
> And you can always set
> 
>   export LS_BLOCK_SIZE="'1kB"
> 
> in your environment to have that by default all of the time for ls.

That only works if you use a locale where %'d inserts thousands
separators.  If you ever run with LC_ALL=C, the ' flag is a no-op.

But this is actually a GOOD thing!  It means that your interactive shell
usage (typically under something like LC_ALL=en_US.UTF-8) is
human-friendly, while your scripts (at least robust scripts, such as
./configure scripts generated by autoconf) can force the locale to be
sane so that they aren't dealing with unexpected input (not that 'ls -l'
output is very reliable to parse in the first place, but it would be
even less reliable with thousands separators).

-- 
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]