On 9/06/10 5:36 PM, Jim Meyering wrote: > 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
Oh! How embarrassing. I'd very carefully read the man page looking for this but I never thought it would only be documented in the info pages (yes, even though the man page states that the full documentation is in the info pages). Well, we live and learn. It's great that it already has this feature :-) Thanks, Sam.
