linux下查看某个文件属于哪个包
1、centos/redhat下查看某个文件或命令属于哪个rpm包:
1$ yum provides /etc/passwd
2或者
3$ rpm -qf /etc/passwd
2、ubuntu及衍生版:
1sudo dpkg -S whereis或
2sudo dpkg-query -S /usr/bin/whereis
具体参考ubuntu wiki skills页面 ,不过该命令不如rpm -qf强大,如/etc/passwd就查不出。
3、gentoo及衍生版
1#未安装的文件
2e-file qmake
3#已安装的文件查看
4equery b <filename>
5或qfile <filename>
捐赠本站(Donate)
如您感觉文章有用,可扫码捐赠本站!(If the article useful, you can scan the QR code to donate))
- Author: shisekong
- Link: https://blog.361way.com/linux-packages-owning-file/2722.html
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.