[Leaplist] list files not from rpm

Ingo Claro miclaro at netred.cl
Mon Feb 9 07:01:53 EST 2009


-------- Original Message --------
Subject: Re: [Leaplist] list files not from rpm
From: Vernon Singleton <vsingleton at cfl.rr.com>
To: This is the Leap Main List <leaplist at leap-cf.org>
Date: 02/07/2009 01:37 AM
> On Fri, 2009-02-06 at 17:42 -0300, Ingo Claro wrote:
>   
>> I'm using centos 5 and wan't to know the files that are not from rpm 
>> ... {snipped for brevity} ...
>> is there a better way?
>>
>> regards,
>> Ingo
>>     
>
> Here is a short script I just wrote for you.
> I called it "filesNotFromRpms.sh":
>
>         #!/bin/bash
>                 
>         updatedb && locate "" | sort > allFiles
>                 
>         rpm -qa | \
>         while read f; do rpm -ql $f; done | \
>         sort | uniq | \
>         grep -v "(contains no files)" > filesFromRpms
>                 
>         comm -3 allFiles filesFromRpms > filesNotFromRpms
>         wc -l filesFromRpms filesNotFromRpms
>         wc -l allFiles
>
> Here is the output from my sad little computer:
>
> # time ./filesNotFromRpms.sh 
> 213112 filesFromRpms
> 619831 filesNotFromRpms
> 832943 total
> 832543 allFiles
>
> real	0m41.487s
> user	0m33.161s
> sys	0m9.268s
>
> I'm not sure why there was a small discrepancy of a few hundred files,
> but it runs pretty fast.  The first time I ran it it took about 3
> minutes because I had not done an updatedb in a while.  Do you need it
> faster?
>
> Hope that helps,
> Vernon
>
>
>
>   
excelent! thanks!
you can also use: rpm -qal to list al rpm owned files

regards,
Ingo

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Leaplist mailing list