1 |
James wrote: |
2 |
|
3 |
>Hello, |
4 |
> |
5 |
>/usr is the only partion I seem to have trouble filling up. After |
6 |
>poking around I've decided to 'prune' /usr/portage/distfiles. |
7 |
> |
8 |
>Before automating this action, via crontab, I'm soliciting |
9 |
>any other, slicker/cooler/better method to auto prune |
10 |
>/usr/portage/distfiles. |
11 |
> |
12 |
>What I have done manually is: |
13 |
>EMOVING LARGE FILES IN /usr/protage/distfiles: |
14 |
>find ./ -size +100000 -exec ls -lag {} \; | less |
15 |
><lists large files> |
16 |
>find ./ -size +100000 -print -exec rm {} \; |
17 |
><prints & removes large files> |
18 |
>again: |
19 |
>find ./ -size +50000 -exec ls -lag {} \; | less |
20 |
>find ./ -size +50000 -print -exec rm {} \; |
21 |
>again: |
22 |
>find ./ -size +20000 -exec ls -lag {} \; | less |
23 |
>find ./ -size +20000 -print -exec rm {} \; |
24 |
> |
25 |
>REMOVING OLD FILES IN /usr/protage/distfiles: |
26 |
>find ./ -mtime +180 -exec ls -lag {} \; | less |
27 |
>find ./ -mtime +180 -print -exec rm {} \; |
28 |
> |
29 |
>Running these commands manually caused the |
30 |
>/usr/ dir to reduce from 88% full to 55% full. |
31 |
> |
32 |
>Looking at the proposed lists of files to be removed, gave |
33 |
>me some confidence that it was OK to remove the files. |
34 |
>Suggestions as to better logic that I could integrate |
35 |
>into a script is welcome. |
36 |
> |
37 |
>Before hacking these commands into a script, I'd be interested |
38 |
>in comments and ideas....(a better mouse trap?) better logic, |
39 |
>like progressively running the commands unti the disk space |
40 |
>threshold is below 60% full or something. |
41 |
> |
42 |
> |
43 |
>James |
44 |
> |
45 |
> |
46 |
> |
47 |
Hi, |
48 |
Going by memory here, but think it's correct ;) |
49 |
Check about FEATURES="... distclean ..." in your /etc/make.conf, IMHO |
50 |
this is a FEATURE which allows you to clean/erase the source files after |
51 |
an emerge. |
52 |
Or use /var to hold your portage-tree (make.conf&ln -s /usr/portage |
53 |
/var/portage ;) (i'm using this setup). |
54 |
HTH. Rumen |