Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] A Gentoo Enema
Date: Sat, 17 Dec 2005 07:27:23
Message-Id: 7573e9640512162323q3341df39je1a2242aae203c35@mail.gmail.com
In Reply to: [gentoo-user] A Gentoo Enema by Tom Eastman
1 On 12/16/05, Tom Eastman <tom@×××××××××××.nz> wrote:
2 > Is there a tool that will allow me to find *all* files that aren't owned
3 > by any package, so that I can then decide what to do with them?
4
5 It should be fairly simple to generate such a list. You can generate
6 a list of all regular files that are owned by an installed package
7 with something like:
8
9 cd /var/db/pkg; find . -name CONTENTS -exec cat {} \; | grep ^obj |
10 awk '{print $2}' | sort
11
12 And then a list of all regular files on your system with:
13
14 find / -type f | grep -v -e "^/home" -e "^/tmp" -e "^/var/db" -e
15 "^/var/tmp" | sort
16
17 Then you just have to diff the two lists to find things that are not
18 owned by a package...
19
20 -Richard
21
22 --
23 gentoo-user@g.o mailing list