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 <[email protected] <mailto:[email protected]>>

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