[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Clever way to find ALL files not owned by RPM?

On Tue, 2003-01-21 at 16:57, Stephen Smoogen wrote:
> I am having to write a lecture on checking on 'open' machines, and have
> the flu.. so am not thinking anywhere close to clever. My first pass at
> the idea was to do something like
> find / -xdev -print0 | xargs -0 rpm -qf > /tmp/b
> which of course thrashed the machine pretty bad while going through the
> /dev directories. I am guessing there is a quicker way of doing this
> using a perl module and such, but couldnt find anything via google. Of
> course, I am just going to blame the flu on my lameness :)

As a first cut I'd do something on the lines of
  find / -print | sort >/tmp/disk.list
  rpm -qal | sort >/tmp/rpm.list
  comm /tmp/disk.list /tmp/rpm.list

and then make more sophisticated as required (skipping /tmp and /home
would be a start)....

[ Nigel Metheringham           Nigel.Metheringham@InTechnology.co.uk ]
[ - Comments in this message are my own and not ITO opinion/policy - ]

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []