>>>>> "thorsten" == thorsten Sideb0ard <[EMAIL PROTECTED]> writes:

    thorsten> Anyone have a rec on a good tool for file system
    thorsten> management?  Specifically what i am looking for is
    thorsten> something that tells me where all my space has gone, the
    thorsten> biggest offenders, largest files and directories etc?

For bare bones but effective, I wrote this little perl script.  

Usage:

> du|sort-du|less


#!/usr/local/bin/perl -w
#sort the output from du; big dirs first

use strict 'vars';

my %dir_sizes;
while (<>) {
  if (m#^(\d+)\s+\./(.*)$#) {
      $dir_sizes{$2} = $1;
    }
}

my @sorted_by_size = sort by_size keys %dir_sizes;
foreach(@sorted_by_size) {
  print "$dir_sizes{$_}\t$_\n";
}

sub by_size {
  $dir_sizes{$b}<=>$dir_sizes{$a};
}

_______________________________________________
Bits mailing list
[EMAIL PROTECTED]
http://www.sugoi.org/mailman/listinfo/bits

Reply via email to