Query package information from the RPM database.
The rpmquery command queries package information from the RPM database based on various criteria.
rpmquery(options)
-qf: Query the package that a specified file belongs to.
-q: Query whether a specified package is installed.
-qc: Query configuration files in a package.
-qd: Query documentation files in a package.
-qi: Query basic information about a package.
Use the rpmquery command to query the package that a specified file belongs to:
[root@localhost ~]# rpmquery -qf /usr/bin/htpasswd
httpd-2.2.3-81.el5.centos