TrumanWong

rpmquery

Query software package information from RPM database

Supplementary instructions

rpmquery command uses a variety of criteria to query software package information from the rpm database.

grammar

rpmquery(option)

Options

-qf: Query the software package to which the specified file belongs;
-q: Query whether the specified software package is installed;
-qc: Query the configuration file in the software package;
-qd: Query the document files in the software package;
-qi: Query basic information of the software package.

Example

Use the rpmquery command to query the software package to which the specified file belongs:

[root@localhost ~]# rpmquery -qf /usr/bin/htpasswd
httpd-2.2.3-81.el5.centos