Gentoo Archives: gentoo-dev

From: Paul de Vrieze <pauldv@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] finding un-owned files (was Unmerging and CONFIG_PROTECT)
Date: Fri, 27 Feb 2004 22:36:04
Message-Id: 200402272335.59088.pauldv@gentoo.org
In Reply to: Re: [gentoo-dev] finding un-owned files (was Unmerging and CONFIG_PROTECT) by Heinrich Wendel
1 On Friday 27 February 2004 22:27, Heinrich Wendel wrote:
2 > Am Friday 27 February 2004 22:16 schrieb William Hubbs:
3 > > Hi all,
4 > >
5 > > I'm not sure if this should go on -dev or -user, but is there a way to
6 > > find out which files on your system are not owned by a package?
7 > >
8 > > Something like this might be a nice feature to ad to equery?
9 > >
10 > > I'm considering filing a bug, but let me know what you think.
11 >
12 > I made a little script for that once (attached), it's quite slow though.
13
14 What is faster is the following:
15
16
17 ======start======
18 #!/bin/bash
19 tmp1=`mktemp /tmp/fooXXXXXXX`
20 tmp2=`mktemp /tmp/fooXXXXXXX`
21
22 find /var/db/pkg -name CONTENTS |cut -d " " -f 2 >$tmp1
23 find / -path '/proc' -prune -o -print $tmp2
24 cat $tmp1 $tmp1 $tmp2 |sort | uniq
25 ======end========
26
27 This will create a list of ALL files that are not known to portage, if you
28 want to make it faster for subdirs you probably need to tweak it a bit, also
29 you might want to filter out other dirs than /proc too (think /sys, /home)
30
31 Paul
32
33 --
34 Paul de Vrieze
35 Gentoo Developer
36 Mail: pauldv@g.o
37 Homepage: http://www.devrieze.net

Replies