Query software package information from RPM database
rpmquery command uses a variety of criteria to query software package information from the rpm database.
rpmquery(option)
-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.
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