[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: du feature request
From: |
Pádraig Brady |
Subject: |
Re: du feature request |
Date: |
Fri, 20 Oct 2006 09:44:30 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.8 (X11/20060502) |
Logan Hansen wrote:
> Sirs,
>
> I would like to request a feature to be added to the 'du' command:
>
> a command line switch to sort output by directory name or by size of
> directory
Yes I can definitely see the need for that.
However what you need is quite easily achieved with existing tools.
For example:
$ du -hbs * | sort -k1,1n | human.py --columns=1 --divisor=1000
336.2K msort-8.26.tar.bz2
442.0K unac-1.7.0.tar.gz
4.2M coreutils-5.1.1.tar.bz2
5.1M coreutils-5.97.tar.bz2
5.3M coreutils-6.0.tar.bz2
7.7M coreutils-6.2.tar.gz
15.2M glibc-2.4.tar.bz2
$ dutop
39% 14.5M ./glibc-2.4.tar.bz2
20% 7.3M ./coreutils-6.2.tar.gz
13% 5.0M ./coreutils-6.0.tar.bz2
13% 4.8M ./coreutils-5.97.tar.bz2
10% 4.0M ./coreutils-5.1.1.tar.bz2
Both dutop and human.py are available at:
http://www.pixelbeat.org/scripts/
Pádraig.