Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How can I find all "orphaned" files?
Date: Fri, 25 Mar 2011 16:33:28
Message-Id: 4D8CC37F.4020503@gmail.com
In Reply to: Re: [gentoo-user] How can I find all "orphaned" files? by Mike Edenfield
1 Mike Edenfield wrote:
2 > On 3/25/2011 5:33 AM, Dale wrote:
3 >
4 >> Neil Bothwick wrote:
5 >>
6 >>> On Fri, 25 Mar 2011 01:33:38 -0500, Dale wrote:
7 >>>
8 >>>
9 >>>
10 >>>> Naturally this returned a lot so we have to use common sense before
11 >>>> deleting something. That said, what about these:
12 >>>>
13 >>>> /usr/bin/cc
14 >>>> /usr/bin/c++
15 >>>> /usr/bin/c89
16 >>>> /usr/bin/gcc
17 >>>> /usr/bin/gcov
18 >>>> /usr/bin/x86_64-pc-linux-gnu-c++
19 >>>>
20 >>>>
21 >>> I think these are created by gcc-config, so don't belong to any package.
22 >>> If you want to do this regularly, I'd suggest creating a list of
23 >>> exceptions that you can exclude from find. You don't need to search
24 >>> everywhere, /{,usr}/{,s}bin, /{,usr}/lib and /opt should be sufficient.
25 >>>
26 >>>
27 >>>
28 >> So if they were deleted things would still work? Just curious. This is
29 >> a recent install so I wasn't expecting it to find much, just files I
30 >> created basically. I just thought it odd that it found so many files
31 >> and that qfile/equery didn't know where they came from either.
32 >>
33 >> That gcc one bugs me tho. It's in /usr/bin but doesn't belong to a
34 >> package. Just blows my mind, which ain't much right now. lol I got
35 >> to get better meds.
36 >>
37 > /usr/bin/gcc doesn't belong to any package. The gcc packages install
38 > versioned files, like:
39 >
40 > /usr/bin/gcc-4.5.2 ->
41 > /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.2/x86_64-pc-linux-gnu-gcc
42 >
43 > When you run gcc-config to pick a compiler, it creates and/or updates
44 > /usr/bin/gcc (and the others) to point to whatever version binaries you
45 > selected.
46 >
47 > If you deleted /usr/bin/cc, /usr/bin/gcc, etc. things would stop
48 > compiling, but just running gcc-config will make them come back. If
49 > /usr/bin/gcc is missing you will get an error about your GCC_SPECS being
50 > wrong but that's because gcc-config tries to run `/usr/bin/gcc -v` to
51 > check for problems. But the error is harmless -- just re-run gcc-config
52 > again and you will see it finish with no problems.
53 >
54 > --Mike
55 >
56 >
57
58 Ahhhh. So it just links the gcc command to whatever version of gcc is
59 active. Kewl !! That makes sense.
60
61 I learned something today. Given my age, I may forget it tomorrow but
62 at least I know it today. lol
63
64 I do wish there was some way to find files that are not needed or used
65 tho. I would still go through the files and delete them manually but it
66 would be nice, especially on my old rig which has a pretty old install.
67 I bet /etc would have quite a few of them.
68
69 Thanks to you and Neil too.
70
71 Dale
72
73 :-) :-)