FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 05-19-2010, 10:36 PM
jaromil
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



Package: itp
Severity: wishlist
Version: 0.4;

* Package name : dirsum
Version : 0.4
Upstream Author : Dirk Bartley <bartleyd2@chartermi.net>
* URL: http://code.dyne.org/?r=dirsum
* License: GNU GPL
Description: Dirsum is a command line tool to assist sorting out which
directories in a filesystem contain the most bytes. It will sort
all of the subdirectories of a selected path according to the total
bytes of all files in them, including recursion through further
subdirectories and mounted partitions.


- --
jaromil, dyne.org developer, http://jaromil.dyne.org

GPG: B2D9 9376 BFB2 60B7 601F 5B62 F6D3 FBD9 C2B6 8E39
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQQcBAEBCAAGBQJL9GfkAAoJEAslGzkIl3JRUzEgAKOpEnZGKv woK09wrQPBaN3x
0/XzQp9KSStqom6Vy8bw3fS1qWpUCPGN+EsJH37CD4ptlz6aoApY 1I00a8rjX5Qi
AbA4WcDrl0P2Y+hkw9yT+9heJcAMaPfS+ViU5xNbt1h8+Jb2cM oMNBapDwB33ZYA
f1jsSiMUTdZxvn+00OJwyqyh5iCqTJwQlo0F9EINt6zQUzsKLU GJ/4nVsQbWxA/x
oi/84xPNoFW/CB5Y2VkLdv8UaRhoXf9kgjh2rM5Fe0LDALoMVcByuOOz/78HIfI1
ibg7rSeOAnSkQaNLRqFW2tIN4R9DxQ4ryiYeWeQfTGz1TALcm3 ywwgbhVPVOii2Y
KaHfjhaEu2c4z+gwnKbDuj4DOaYKvPVuTbn+jICy9fVH/5NA2Sa5WwwFnARX56PC
sxqGAYHaXtJFHDMQtCBsZywTxkjkBOIF/gEkJU1MXXa6hSA9DG4QglQhK+T3sQZr
7dcD1x8owDqceqoRLg0lm7hzuQ3EBUlbNO+E54wNBkyT9WMSiX ekuKAgsQn9v/Ut
6h/AWjX6RiQS0oiIXINEBsUDrA7/dlLUpUO+5vR4/4K33AbnKy8N8spDPpwE/WDH
Nh8IXC6qz6jUfzYJneDgfjFUxnpUhO4UKAtlAutVVJumdPmKTQ 9MAXFuNATGIbBi
Qqq2N3rQtJ6PdNqRS+IGS0nXse2QCiao2HBILc6GuSUwdIQDGQ 5ivCNSpu4X3Sjh
dsm889Wa14jFyoXUjSqKDWlxs7aEDjGmVESDmq3rB5Ix87z+ln rkrIhLf7qvF7K5
Bmedou6Oon4zIMgvrjrB2Nh3UJID2Aj7NOCm05csOKwFYpluRD rOA6OxQUbO2zGC
/7TbCV/qPH28XjpavM0f4RFVRwJsHEIA7WhSfUYXXub8lSyovgBAvRJWh dRcSYnU
nVKW1p7HImGvvReLIp1JjktceV2+C/nQq/LsvyUPoLgdIgHJH+GKG/drMZdK6tmg
ffeb+6f6YtMLEMyh+xRwfFP760mLKOAQM/g2atuIPn02yvzr2RVX8RIsmpv8enz2
r3jVVd/UHzwOJQjhS9AosPgrTgqDz2Xle735ZtH1FpBTp6H+/DYi3jmi+BW4w9YR
GxkPTAqPZnaJAkkJJJMPoc+RL/f9h//7nNgeIMoKhpfpGCEYRPx1eYD5RwhnFCTS
6nUDbQPtaRFENKw2wGzbCJrG3DO6A/Et+tM35zv0M2yIKUUaRQv2xSEnqsuV671u
6+m1TFOKBEdppx8KxNU2Qcc0EvsBzOnNq5KIEGT5ZLL+olgmjf bHpecikoXW2VAC
B36iFGrBPnb/0HkbC5W7wKCdU7ZIh8o3cvSULNsMAAjtAbLgxG/J5ZaGM0EHDR8=
=ci2i
-----END PGP SIGNATURE-----



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100519223625.GA19745@dyne.org">http://lists.debian.org/20100519223625.GA19745@dyne.org
 
Old 05-20-2010, 09:21 AM
Ron Johnson
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

On 05/19/2010 05:36 PM, jaromil wrote:


Package: itp
Severity: wishlist
Version: 0.4;

* Package name : dirsum
Version : 0.4
Upstream Author : Dirk Bartley<bartleyd2@chartermi.net>
* URL: http://code.dyne.org/?r=dirsum
* License: GNU GPL
Description: Dirsum is a command line tool to assist sorting out which
directories in a filesystem contain the most bytes. It will sort
all of the subdirectories of a selected path according to the total
bytes of all files in them, including recursion through further
subdirectories and mounted partitions.



What does this do that existing tools don't?

$ du -Sk | sort -nr | head -n10
131960 ./.Newsletters.Washington_Post/cur
115332 ./.Lists.Debian.User.history.2007q1/cur
90704 ./.Lists.Debian.User.history.2007q2/cur
87364 ./.Lists.Debian.User.history.2005q3/cur
80544 ./.Lists.postgresql.history.2007h1/cur
77712 ./.Lists.postgresql.history.2007h2/cur
77540 ./.Lists.Debian.User.history.2006q2/cur
77024 ./.Lists.Debian.User.history.2006q1/cur
75464 ./.Miscelaneous/cur
75008 ./.Lists.Debian.User.history.2007q3/cur

--
Dissent is patriotic, remember?


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4BF4FF10.6040002@cox.net">http://lists.debian.org/4BF4FF10.6040002@cox.net
 
Old 05-20-2010, 10:05 AM
Yves-Alexis Perez
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

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.

Cheers,
--
Yves-Alexis


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4BF5097E.80703@debian.org">http://lists.debian.org/4BF5097E.80703@debian.org
 
Old 05-20-2010, 11:07 AM
Ron Johnson
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

On 05/20/2010 05:05 AM, Yves-Alexis Perez wrote:

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.



Eh?????

Filters and do-one-thing-well utilities are The Unix Way.

--
Dissent is patriotic, remember?


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4BF517E8.9020606@cox.net">http://lists.debian.org/4BF517E8.9020606@cox.net
 
Old 05-20-2010, 11:14 AM
Michal Politowski
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

On Thu, 20 May 2010 06:07:20 -0500, Ron Johnson wrote:
> On 05/20/2010 05:05 AM, Yves-Alexis Perez wrote:
> >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.
> >
>
> Eh?????
>
> Filters and do-one-thing-well utilities are The Unix Way.

So, alternatively, where is the filter converting 131960 to 128M?

--
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100520111453.GA27889@meep.pl">http://lists.debian.org/20100520111453.GA27889@meep.pl
 
Old 05-20-2010, 11:41 AM
Patrick Schoenfeld
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

On Thu, May 20, 2010 at 12:05:50PM +0200, Yves-Alexis Perez wrote:
> 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.

Why not? What speaks against using:

du -h | sort -h

I think its suitable for that purpose.

Regards,
Patrick


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100520114115.GA9878@lisa">http://lists.debian.org/20100520114115.GA9878@lisa
 
Old 05-20-2010, 11:42 AM
Mika Pflüger
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

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.

This feature was introduced in GNU coreutils release 7.5, 2009-08-20 [2]

As the coreutils version in debian sid and squeeze (I couldn't verify
lenny) is newer, the following command will work:
du -sh |sort -hr

to have the largest files first. the sort(1) man page on debian
documents this behaviour.

So if it only takes one pipe and coreutils to implement the
functionality of dirsum, maybe it's not worth a package.

Cheers,

Mika

[1]
http://www.gnu.org/software/coreutils/manual/coreutils.html#sort-invocation
[2]
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=NEWS;hb=1d10eb8b1e eff9dd0fe1bbbc212e9535203acff0,
search for '--human-numeric-sort'

--
Own your own computer. Don't use Windows 7. <http://windows7sins.org>
 
Old 05-20-2010, 11:49 AM
Salvo Tomaselli
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

On Thursday 20 May 2010 13:07:20 Ron Johnson wrote:
> Eh?????
>
> Filters and do-one-thing-well utilities are The Unix Way.

Fully agree on that! If one wants a do-everything-software can always use
windows.

--
Salvo Tomaselli
 
Old 05-20-2010, 12:06 PM
Ron Johnson
 
Default 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?


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4BF525BD.5070209@cox.net">http://lists.debian.org/4BF525BD.5070209@cox.net
 
Old 05-20-2010, 12:31 PM
Yves-Alexis Perez
 
Default Bug#582321: TAG: dirsum -- commandline directory summary

On 20/05/2010 13:41, Patrick Schoenfeld wrote:
> Why not? What speaks against using:
>
> du -h | sort -h
>
> I think its suitable for that purpose.

Wow, thanks, I didn't know that. It doesn't exist in lenny coreutils, so
I guess it's not so old. You made my day

Cheers,
--
Yves-Alexis


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4BF52B9B.30404@debian.org">http://lists.debian.org/4BF52B9B.30404@debian.org
 

Thread Tools




All times are GMT. The time now is 11:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org