1 |
Hello, |
2 |
|
3 |
/usr is the only partion I seem to have trouble filling up. After |
4 |
poking around I've decided to 'prune' /usr/portage/distfiles. |
5 |
|
6 |
Before automating this action, via crontab, I'm soliciting |
7 |
any other, slicker/cooler/better method to auto prune |
8 |
/usr/portage/distfiles. |
9 |
|
10 |
What I have done manually is: |
11 |
EMOVING LARGE FILES IN /usr/protage/distfiles: |
12 |
find ./ -size +100000 -exec ls -lag {} \; | less |
13 |
<lists large files> |
14 |
find ./ -size +100000 -print -exec rm {} \; |
15 |
<prints & removes large files> |
16 |
again: |
17 |
find ./ -size +50000 -exec ls -lag {} \; | less |
18 |
find ./ -size +50000 -print -exec rm {} \; |
19 |
again: |
20 |
find ./ -size +20000 -exec ls -lag {} \; | less |
21 |
find ./ -size +20000 -print -exec rm {} \; |
22 |
|
23 |
REMOVING OLD FILES IN /usr/protage/distfiles: |
24 |
find ./ -mtime +180 -exec ls -lag {} \; | less |
25 |
find ./ -mtime +180 -print -exec rm {} \; |
26 |
|
27 |
Running these commands manually caused the |
28 |
/usr/ dir to reduce from 88% full to 55% full. |
29 |
|
30 |
Looking at the proposed lists of files to be removed, gave |
31 |
me some confidence that it was OK to remove the files. |
32 |
Suggestions as to better logic that I could integrate |
33 |
into a script is welcome. |
34 |
|
35 |
Before hacking these commands into a script, I'd be interested |
36 |
in comments and ideas....(a better mouse trap?) better logic, |
37 |
like progressively running the commands unti the disk space |
38 |
threshold is below 60% full or something. |
39 |
|
40 |
|
41 |
James |
42 |
|
43 |
-- |
44 |
gentoo-user@g.o mailing list |