[plug] rpm command

Leon Brooks leon at brooks.fdns.net
Wed Mar 6 09:28:59 WST 2002


On Wednesday 06 March 2002 09:19, Steve Grasso wrote:
> On Wednesday 06 March 2002 17:52, Jon L.Miller wrote:
> > I need to know how to query a group of packages that may contain a file
> > (libdb-3.1.so).  I used the following to no prevail:

> > rpm -qp lib*|grep libdb-3.1.so

> Try something like:
> rpm -qp --filesbypkg *rpm|grep libdb

If the packages are actually installed (having another system to hand is 
useful here), you can do:

    rpm -qf /path/to/file

It *may* be possible to do something like this (untested):

    rpm -qf /path/to/file -p *.rpm

IIRC, using the f option helps you more when a file is a symlink or is 
otherwise generated at install time rather than simply unpacked.

Cheers; Leon



More information about the plug mailing list