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: Pádraig Brady
Subject: Re: suggestion for 'ls' coreutil, comma'd filesizes in -l output
Date: Tue, 04 Jun 2013 20:19:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 06/04/2013 06:23 PM, smu johnson wrote:
> Dear coreutils email maintainer,
> 
> I have a suggestion for 'ls'.  My idea is a GNU extension switch which 
> commafies (for lack of a better word) the filesizes in the basic -l output of 
> integers.  This has been the default for 'dir' since MS-DOS, but I think it 
> might be a good addition for an optional switch in 'ls', in which case i'd 
> "enable it" by making / modifying my alias for 'ls'.
> 
> Right now I use a frontend for 'ls' written in Perl to do the same job, but 
> as you can probably guess, the solution is a bit cludgey and likely prone to 
> fail down the road.  But right now, its output is:
> 
> sjohnson@web1:/tmp/sjohnson$ ls -l test*
> -rw-r--r-- 1 sjohnson sjohnson    13,824 2012-12-10 13:32 test1.txt
> -rw-r--r-- 1 sjohnson sjohnson     9,973 2012-12-10 12:13 test.bin
> -rw-r--r-- 1 sjohnson sjohnson        71 2013-04-10 17:49 test.txt
> 
> Any thoughts or comments greatly appreciated.  Thank you for reading.
> 
> 
> -- 
> smu johnson <address@hidden <mailto:address@hidden>>

You can do that through BLOCK_SIZE.
That can be set in an alias for example like:

alias l="BLOCK_SIZE=\'1 /bin/ls -l --color=auto"

I use that and more in my "l" script at:
http://www.pixelbeat.org/scripts/l

cheers,
Pádraig.



reply via email to

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