Search file in rpm package

repoquery

If you want to find from which rpm package a file is installed, try following command:

repoquery -f <path/filename>

Example: if you want to find perl

[root@srv /]# whereis -b perl
perl: /usr/bin/perl
[root@srv /]# repoquery -f /usr/bin/perl
perl-4:5.8.8-42.el5.i386
perl-4:5.8.8-43.el5_11.i386
perl-4:5.8.8-42.el5.x86_64
perl-4:5.8.8-41.el5.i386
perl-4:5.8.8-43.el5_11.x86_64
perl-4:5.8.8-43.el5_11.x86_64

rpm

rpm -qf <file>

Example:

rpm -qf /usr/bin/implantisomd5
isomd5sum-1.0.10-5.el7.x86_64


Authors:
  • Jochen Schnuerle