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

Re: Bug#582321: TAG: dirsum -- commandline directory summary



On 05/20/2010 06:42 AM, Mika Pflüger wrote:
Hi,

Am Thu, 20 May 2010 12:05:50 +0200
schrieb Yves-Alexis Perez<corsac@debian.org>:

On 20/05/2010 11:21, Ron Johnson wrote:
hat does this do that existing tools don't?

$ du -Sk | sort -nr | head -n10
131960    ./.Newsletters.Washington_Post/cur

not sure dirsum can do that either, but it's painful that du itself
can't sort, since you can't use du -h before piping to sort.

Well, newer versions of sort added the functionality you miss, citing
from the GNU coreutils manual [1]:
‘-h’
‘--human-numeric-sort’
‘--sort=human-numeric’
     Sort numerically, as per the --numeric-sort option below, and in
     addition handle IEC or SI suffixes like MiB, MB etc (Block size).
     Note a mixture of IEC and SI suffixes is not supported and will be
     flagged as an error. Also the numbers must be abbreviated
     uniformly. I.E. values with different precisions like 6000K and 5M
     will be sorted incorrectly.


Well that's not The Unix Way!  ;)

--
Dissent is patriotic, remember?


Reply to: