rpm必知100问:如何查询命令或配置文件来自哪个rpm包?
查询命令来自哪个rpm包?
- 通过which找到命令的全路径
[root@localhost test]# which top
/usr/bin/top
- rpm -qf查询命令来自哪个rpm包
[root@localhost test]# rpm -qf /usr/bin/top
procps-ng-3.3.15-14.0.1.an8.x86_64
查询配置文件来自哪个rpm包?
- 例如/etc/ssh/sshd_config
[root@localhost test]# rpm -qf /etc/ssh/sshd_config
openssh-server-8.0p1-25.0.1.an8.x86_64