GNU bug report logs -
#6381
[PATCH] Add digit grouping option for file sizes in "ls"
Previous Next
Reported by: Sam Bobroff <samb <at> firx.net>
Date: Wed, 9 Jun 2010 06:17:02 UTC
Severity: wishlist
Tags: moreinfo, patch
Done: Bob Proulx <bob <at> proulx.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Sam Bobroff wrote:
> Please excuse me if I'm not going about this the right way but I would
> like to offer a tiny patch for "ls" that adds an option to turn on digit
> grouping for file sizes in the long output format.
>
> (The support for displaying digit grouping is already present, all that
> is required is an option for turning it on.)
>
> I find it a very nice way to view file sizes because it makes it easy to
> read the size of large files (like -h) but it does not hide any
> information (unlike -h).
>
> For example:
>
> $ ls -l bigfile
> -rw-r--r-- 1 samb samb 2146034154 2010-06-08 14:55 big.log
>
> $ ls -ly bigfile
> -rw-r--r-- 1 samb samb 2,146,034,154 2010-06-08 14:55 big.log
Thanks, but you can do that already.
Use --block-size="'1" and be sure you're using a locale
that uses the thousands-grouping byte you're used to:
$ dd if=/dev/zero of=big bs=1k count=1 seek=1G
...
$ LC_ALL=en_US ls -lgo --block-size="'1" big
-rw-------. 1 1,099,511,628,800 2010-06-09 09:32 big
This bug report was last modified 15 years and 45 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.