[Top][All Lists]

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

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

From: Bob Proulx
Subject: Re: suggestion for 'ls' coreutil, comma'd filesizes in -l output
Date: Wed, 5 Jun 2013 09:28:26 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Eric Blake wrote:
> 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.

Ah!  Yes.  Good point.

> 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).

I hadn't thought of that.  Good points.

Personally I don't use the thousands separators.  I use ls -h most of
the time to get readable human output.  A personal preference.


reply via email to

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