Whe Joey Hess replied to Will Lowe, I added: Attached is a little perl I wrote tohelp you decide what directories to move and how much space to assign. You just say, for example:
redice /usr -or- redice /var/spool and it will report the subdirectories and the space they're using as a percentage of total and as total blocks. HTH BTW, I should probably have called it reslice, but I HATE to type and always try to save ketstrokes. > > Will Lowe wrote: > > I'm running out of space on my /usr partition (500 megs). I have another > > 300 megs of unpartitioned space I could add to it, but I haven't got any > > idea where would be a logical place to split /usr -- I'd prefer not to > > combine them into one 300 meg partition. /usr/local is already a seperate > > partition. Any suggestions? > > /usr/X11R6 tends to work well (it's 30% of my /usr). /usr/lib is sometimes a > good choice, too (33% of my /usr). Just run du on some of the directories > and see how much space various parts of your /usr are taking up, and go from > there. > > -- > see shy jo > > -- > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to > [EMAIL PROTECTED] . > Trouble? e-mail to [EMAIL PROTECTED] . -- ----------------------------------------- Ralph Winslow [EMAIL PROTECTED] Mary bought a pair of skates upon the ice to frisk now wasn't that a crazy way her sweet young *?
#!/usr/bin/perl if($#ARGV == -1) { die "$0: Usage: redice <directory> [<directory. ...]\n"; } else { for($idx = 0; $dir = $ARGV[$idx]; $idx++) { if(!-d $dir) { warn "$0: $dir isn't a directory, ignored\n"; }; chdir $dir or (warn "$0: can't cd to $dir\n", next); open(CMD,"du |") or (warn "$0: can't du $dir: $!\n", next); while(($Tote, $Path) = split(/\s+/,<CMD>)) { ($junk, $Sub, $foo) = split(/\//,$Path); if(!defined($Sub)) { $Grand = $Tote; }; if(defined($foo)) { next; }; $tab{$Sub} = $Tote; }; close(CMD); print "$dir has $Grand blocks:\n"; foreach $ky (keys %tab) { if(length($ky) < 1) { next; }; print $ky.':'; $spccnt = 20 - length($ky); print ' ' x $spccnt; $prcnt = $tab{$ky}/ $Grand; $prcnt *= 100; printf("%2.2f\%\t$tab{$ky}\n",$prcnt); }; }; }; exit;