On 7/28/05, Tzafrir Cohen <[EMAIL PROTECTED]> wrote:
> On Wed, Jul 27, 2005 at 05:12:53PM +0300, Michael Green wrote:
> > I'm looking for script that will traverse filesystem of an RPM-based
> > distro and find files that do not belong to any RPM.
> >
> > Anyone?
> 
> 'rpm -qal' will produce a list of files in an RPM package.
> 
> find can produce a list of files on the system . Be sure to to exclude
> some trees (/proc , /sys , /home ?)
> 
> sort both and use diff -u to compare.

"| sort | uniq -u" will print lines which appear only once.
Assuming that all the files listed in the RPM database should also
appear in the filesystem this will be the list you want.
If not then give this output another run and check for their existanc -
if they exists then they are from the filesystem, otherwise from
the RPM database.

Expect differences also in /dev, and don't be surprised if /etc and
/var are different too.

--Amos

================================================================To unsubscribe, 
send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to