linux查看命令所在软件包,linux 下怎么查看某个命令依赖于哪个软件包

[root@mysql-master ~]# fuser -m /dev/sda1

bash: fuser: 未找到命令

第一种方法:

[root@mysql-master ~]# yum whatprovides fuser

已加载插件:fastestmirror

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Loading mirror speeds from cached hostfile

* base: mirrors.huaweicloud.com

* epel: mirrors.yun-idc.com

* extras: mirrors.huaweicloud.com

* updates: mirrors.huaweicloud.com

base/7/x86_64/filelists_db                                      | 6.9 MB  00:00:02

epel/x86_64/filelists                                           |  10 MB  00:00:01

extras/7/x86_64/filelists_db                                    | 595 kB  00:00:00

updates/7/x86_64/filelists_db                                   | 2.9 MB  00:00:00

psmisc-22.20-15.el7.x86_64 : Utilities for managing processes on your system

源    :base

匹配来源:

文件名    :/usr/sbin/fuser

第二种

[root@mysql-master ~]# yum provides fuser

已加载插件:fastestmirror

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Loading mirror speeds from cached hostfile

* base: mirrors.huaweicloud.com

* epel: mirrors.yun-idc.com

* extras: mirrors.huaweicloud.com

* updates: mirrors.huaweicloud.com

psmisc-22.20-15.el7.x86_64 :Utilities for managing processes on your system

源    :base

匹配来源:

文件名    :/usr/sbin/fuser

安装软件

[root@mysql-master ~]# yum -y install psmisc

已加载插件:fastestmirror

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Loading mirror speeds from cached hostfile

* base: mirrors.huaweicloud.com

* epel: mirrors.yun-idc.com

* extras: mirrors.huaweicloud.com

* updates: mirrors.huaweicloud.com

正在解决依赖关系

--> 正在检查事务

---> 软件包 psmisc.x86_64.0.22.20-15.el7 将被 安装

--> 解决依赖关系完成

依赖关系解决

=======================================================================================

Package            架构               版本                     源                大小

=======================================================================================

正在安装:

psmisc             x86_64             22.20-15.el7             base             141 k

[root@mysql-master ~]# fuser --help

fuser: Invalid option --help

Usage: fuser [-fMuvw] [-a|-s] [-4|-6] [-c|-m|-n SPACE] [-k [-i] [-SIGNAL]] NAME...

fuser -l

fuser -V

Show which processes use the named files, sockets, or filesystems.

-a,--all              display unused files too

-i,--interactive      ask before killing (ignored without -k)

-k,--kill             kill processes accessing the named file

-l,--list-signals     list available signal names

-m,--mount            show all processes using the named filesystems or block device

-M,--ismountpoint     fulfill request only if NAME is a mount point

-n,--namespace SPACE  search in this name space (file, udp, or tcp)

-s,--silent           silent operation

-SIGNAL               send this signal instead of SIGKILL

-u,--user             display user IDs

-v,--verbose          verbose output

-w,--writeonly        kill only processes with write access

-V,--version          display version information

-4,--ipv4             search IPv4 sockets only

-6,--ipv6             search IPv6 sockets only

-                     reset options

udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值