bug-coreutils
[Top][All Lists]
Advanced

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

bug#9187: du feature request


From: Eric Blake
Subject: bug#9187: du feature request
Date: Thu, 28 Jul 2011 13:15:18 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11

tag 9187 notabug
thanks

On 07/27/2011 08:06 PM, Hugh Esco wrote:
perhaps I just need to learn the right switches to apply to sort on the
other side of a pipe, but I have often wanted to sort the results of du
in descending order and have it get it how to parse the -s(ummary) -h
(uman) readable output.

Rather than bloat du with additional --sort-order parameters, which will never meet everyone's needs, it's better to make the standard sort able to generically handle du -h output just like any other sort column. So much so that in fact, we've already done it, by adding -h to sort.


$ du -sh /var/log/*

You should be pleased with:

du -sh /var/log/* | sort -k1,1h

(You may need to upgrade to coreutils 7.5 or newer)

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org





reply via email to

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