1、centos/redhat下查看某个文件或命令属于哪个rpm包:

$ yum provides /etc/passwd
或者
$ rpm -qf /etc/passwd

2、ubuntu及衍生版:

sudo dpkg -S whereis
sudo dpkg-query -S /usr/bin/whereis

 

具体参考ubuntu wiki skills页面 ,不过该命令不如rpm -qf强大,如/etc/passwd就查不出。

3、gentoo及衍生版

 

#未安装的文件
e-file qmake
#已安装的文件查看
equery b <filename>
qfile <filename>



转自:http://www.361way.com/linux-packages-owning-file/2722.html

相关文章:

  • 2022-01-13
  • 2022-12-23
  • 2022-01-17
  • 2021-05-27
  • 2021-09-09
  • 2022-01-08
  • 2022-03-03
猜你喜欢
  • 2021-06-28
  • 2021-09-04
  • 2021-11-08
  • 2022-12-23
  • 2021-11-05
相关资源
相似解决方案