Hello,

/usr is the only partion I seem to have trouble filling up. After
poking around I've decided to 'prune' /usr/portage/distfiles.

Before automating this action, via crontab, I'm soliciting
any other, slicker/cooler/better method to auto prune
/usr/portage/distfiles.

What I have done manually is:
EMOVING LARGE FILES IN /usr/protage/distfiles:
find ./ -size +100000  -exec ls -lag {} \; | less       
<lists large files>
find ./ -size +100000 -print -exec rm {} \;     
<prints & removes large files>
again:
find ./ -size +50000  -exec ls -lag {} \; | less
find ./ -size +50000  -print -exec rm {} \;
again:
find ./ -size +20000  -exec ls -lag {} \; | less
find ./ -size +20000  -print -exec rm {} \;

REMOVING OLD FILES IN /usr/protage/distfiles:
find ./ -mtime +180 -exec ls -lag {} \; | less
find ./ -mtime +180 -print -exec rm {} \;

Running these commands manually caused the 
/usr/  dir to reduce from 88% full to 55% full.

Looking at the proposed lists of files to be removed, gave
me some confidence that it was OK to remove the files.
Suggestions as to better logic that I could integrate
into a script is welcome.

Before  hacking these commands into a script, I'd be interested 
in comments and ideas....(a better mouse trap?) better logic, 
like progressively running the commands unti the disk space 
threshold is below 60% full or something.


James

-- 
gentoo-user@gentoo.org mailing list

Reply via email to