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

2010-05-21 Thread Joey Hess
I'm unsure if this ITP was filed as a reaction to my closure of #571575,
or without knowledge of it. But ..

a) I am really suprised that many people would care that du -h | sort -h
   doesn't list files in strict order of size. Does which of two 1.0G
   files is largest really tend to matter? Enough to have a whole other
   package?

b) If you do care which 1.0G file is biggest, then an option to have du
   include some additional precision in its -h output would easily solve
   your problem. Or there's the small modification I suggest to du at
   http://bugs.debian.org/563118#70 would allow sorting its output
   exactly by size, without the ugliness of needing a sort -h, and while
   still providing human-readable file sizes.

c) I'd certianly be willing to consider for moreutils a filter that
   converts block or byte sized input into human-readable sizes.
   That would be the full-on unix way to go.

-- 
see shy jo


signature.asc
Description: Digital signature


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

2010-05-20 Thread Ron Johnson

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 Bartleybartle...@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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4bf4ff10.6040...@cox.net



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

2010-05-20 Thread Yves-Alexis Perez
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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4bf5097e.80...@debian.org



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

2010-05-20 Thread Ron Johnson

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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4bf517e8.9020...@cox.net



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

2010-05-20 Thread Patrick Schoenfeld
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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100520114115.ga9...@lisa



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

2010-05-20 Thread Mika Pflüger
Hi,

Am Thu, 20 May 2010 12:05:50 +0200
schrieb Yves-Alexis Perez cor...@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=1d10eb8b1eeff9dd0fe1bbbc212e9535203acff0,
search for '--human-numeric-sort'

-- 
Own your own computer. Don't use Windows 7. http://windows7sins.org


signature.asc
Description: PGP signature


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

2010-05-20 Thread Salvo Tomaselli
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


signature.asc
Description: This is a digitally signed message part.


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

2010-05-20 Thread Michal Politowski
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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100520111453.ga27...@meep.pl



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

2010-05-20 Thread Ron Johnson

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

Hi,

Am Thu, 20 May 2010 12:05:50 +0200
schrieb Yves-Alexis Perezcor...@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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4bf525bd.5070...@cox.net



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

2010-05-20 Thread Yves-Alexis Perez
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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4bf52b9b.30...@debian.org



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

2010-05-20 Thread Peter Palfrader
On Thu, 20 May 2010, Ron Johnson wrote:

 On 05/19/2010 05:36 PM, jaromil wrote:
 * Package name : dirsum
 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

Or, to compare it to something that my users can use too, what does it
offer over ncdu.

Cheers,
weasel
-- 
   |  .''`.  ** Debian GNU/Linux **
  Peter Palfrader  | : :' :  The  universal
 http://www.palfrader.org/ | `. `'  Operating System
   |   `-http://www.debian.org/


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100520123433.ga28...@anguilla.noreply.org



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

2010-05-20 Thread Ron Johnson

On 05/20/2010 07:34 AM, Peter Palfrader wrote:

On Thu, 20 May 2010, Ron Johnson wrote:


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

* Package name : dirsum
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


Or, to compare it to something that my users can use too,


You could put that in an alias in /etc/profile.


  what does it
offer over ncdu.



--
Dissent is patriotic, remember?


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4bf52e00.4060...@cox.net



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

2010-05-19 Thread jaromil
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256



Package: itp
Severity: wishlist
Version: 0.4;

* Package name : dirsum
Version : 0.4
Upstream Author : Dirk Bartley bartle...@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)

iQQcBAEBCAAGBQJL9GfkAAoJEAslGzkIl3JRUzEgAKOpEnZGKvwoK09wrQPBaN3x
0/XzQp9KSStqom6Vy8bw3fS1qWpUCPGN+EsJH37CD4ptlz6aoApY1I00a8rjX5Qi
AbA4WcDrl0P2Y+hkw9yT+9heJcAMaPfS+ViU5xNbt1h8+Jb2cMoMNBapDwB33ZYA
f1jsSiMUTdZxvn+00OJwyqyh5iCqTJwQlo0F9EINt6zQUzsKLUGJ/4nVsQbWxA/x
oi/84xPNoFW/CB5Y2VkLdv8UaRhoXf9kgjh2rM5Fe0LDALoMVcByuOOz/78HIfI1
ibg7rSeOAnSkQaNLRqFW2tIN4R9DxQ4ryiYeWeQfTGz1TALcm3ywwgbhVPVOii2Y
KaHfjhaEu2c4z+gwnKbDuj4DOaYKvPVuTbn+jICy9fVH/5NA2Sa5WwwFnARX56PC
sxqGAYHaXtJFHDMQtCBsZywTxkjkBOIF/gEkJU1MXXa6hSA9DG4QglQhK+T3sQZr
7dcD1x8owDqceqoRLg0lm7hzuQ3EBUlbNO+E54wNBkyT9WMSiXekuKAgsQn9v/Ut
6h/AWjX6RiQS0oiIXINEBsUDrA7/dlLUpUO+5vR4/4K33AbnKy8N8spDPpwE/WDH
Nh8IXC6qz6jUfzYJneDgfjFUxnpUhO4UKAtlAutVVJumdPmKTQ9MAXFuNATGIbBi
Qqq2N3rQtJ6PdNqRS+IGS0nXse2QCiao2HBILc6GuSUwdIQDGQ5ivCNSpu4X3Sjh
dsm889Wa14jFyoXUjSqKDWlxs7aEDjGmVESDmq3rB5Ix87z+lnrkrIhLf7qvF7K5
Bmedou6Oon4zIMgvrjrB2Nh3UJID2Aj7NOCm05csOKwFYpluRDrOA6OxQUbO2zGC
/7TbCV/qPH28XjpavM0f4RFVRwJsHEIA7WhSfUYXXub8lSyovgBAvRJWhdRcSYnU
nVKW1p7HImGvvReLIp1JjktceV2+C/nQq/LsvyUPoLgdIgHJH+GKG/drMZdK6tmg
ffeb+6f6YtMLEMyh+xRwfFP760mLKOAQM/g2atuIPn02yvzr2RVX8RIsmpv8enz2
r3jVVd/UHzwOJQjhS9AosPgrTgqDz2Xle735ZtH1FpBTp6H+/DYi3jmi+BW4w9YR
GxkPTAqPZnaJAkkJJJMPoc+RL/f9h//7nNgeIMoKhpfpGCEYRPx1eYD5RwhnFCTS
6nUDbQPtaRFENKw2wGzbCJrG3DO6A/Et+tM35zv0M2yIKUUaRQv2xSEnqsuV671u
6+m1TFOKBEdppx8KxNU2Qcc0EvsBzOnNq5KIEGT5ZLL+olgmjfbHpecikoXW2VAC
B36iFGrBPnb/0HkbC5W7wKCdU7ZIh8o3cvSULNsMAAjtAbLgxG/J5ZaGM0EHDR8=
=ci2i
-END PGP SIGNATURE-



-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100519223625.ga19...@dyne.org