Yum:搜索具有二进制名称的包

dei*_*mus 16 yum rpm

有没有办法使用二进制名称搜索包。

例如,我想为命令“ ls”找到 rpm 包,那么它应该是coreutils-6.9-10.4.i586例如。

小智 21

yum 命令“whatprovides”接受通配符。如果您正在搜索提供特定文件或可执行文件的包,但不知道其完整路径,请使用“yum whatprovides */filename”。

$ yum whatprovides */ls

coreutils-5.97-23.el5_4.2.x86_64 : The GNU core utilities: a set of tools
                                 : commonly used in shell scripts
Repo        : installed
Matched from:
Filename    : /bin/ls
Run Code Online (Sandbox Code Playgroud)