1 |
Hello, |
2 |
|
3 |
On Sun, 25 Apr 2010 13:18:25 +0200 |
4 |
Angelo Arrifano <miknix@g.o> wrote: |
5 |
|
6 |
> Hello developers developers and developers, |
7 |
> |
8 |
> Ever wondered how much crap is left in your X-years old Gentoo box? |
9 |
> |
10 |
> I just developed a python utility to efficiently find orphaned files |
11 |
> in the system. By orphaned files I mean the files that are present on |
12 |
> system directories and don't belong to any installed package. |
13 |
> |
14 |
> The package builds a virtual filesystem (cache) on the RAM using |
15 |
> python hash tables. Then it uses the cache to find the ownership of |
16 |
> files inside user-specified dirs. |
17 |
> |
18 |
> Building the cache takes less than 10 seconds here in a system with |
19 |
> 1366 installed packages. |
20 |
> |
21 |
> This is not intended to be a finished program yet, I'm looking forward |
22 |
> for your constructive commentaries. |
23 |
|
24 |
There is a tool that does that, qfile from app-portage/portage-utils. |
25 |
Check the "-o, --orphans * List orphan files" option. |
26 |
|
27 |
It's not as straight forward as it could be, as it checks only for |
28 |
files specified as arguments or read from file. |
29 |
|
30 |
But you can trivially use it like: |
31 |
# find /dir/you/want/to/check/for/orphans | qfile -o -f - |
32 |
|
33 |
Best, |
34 |
Yuri. |