三三世界-百宝箱

文章 分类 标签
130 9 247

公告

暂无站点公告

CentOS系统查看软件安装路径/查找文件方法

三三 2022-02-18 1742 0条评论 Linux使用 centos查找文件查看安装目录

首页 / 正文

Linux系统一般都是命令行界面,对于安装的软件也是通过命令安装的。对于软件包更新和卸载等有时候需要查看检查是否有改软件,软件安装存储的路径对于修改配置文件等是必要的。那么怎么查看软件安装路径呢?
我们以centos系统下的bzip2软件为例演示,简单查找软件安装路径的方法

1、通过rpm查看

查看软件是否安装。首先我们需要查看软件是否已经安装,或者说查看安装的软件包名称。如查找是否安装bzip2

rpm -qa |grep bzip2

2、接着根据 rpm -ql 列出软件包安装的文件

rpm -ql bzip2-devel-1.0.6-13.el7.x86_64

3、综合上述以上的问题,可以直接使用 rpm -qal |grep bzip2 查看bzip2所有安装包的文件存储位置

rpm -qal |grep bzip2

4、yum查找

除了rpm 查询还可以通过yum search 查找对应可以安装的软件包

yum search bzip2

5、其他查找方法

除了根据软件包来找文件位置之外,最常用的就是通过find查找某个关键字比如mysql所有包含bzip2服务的文件路径

find / -name bzip2

6、Which查找命令

Which命令是通过 PATH环境变量查找可执行文件路径,用于查找指向这个命令所在的文件夹

which bzip2

7、Whereis命令和find类似,不过不同的是whereis是通过本地架构好的数据库索引查找会比较快。如果没有更新到数据库里面的文件或命令则无法查找到信息

whereis bzip2

评论(0)

当前没有评论,还不快来留下第一个脚印吧


Copyright 2021 三三世界-百宝箱. All Rights Reserved.

最新评论

  • 三三

    @Doug Shume it's ok for me , you can post here.

  • refugiaguenther

    Saved as a favorite, I like your website!

  • josefa

    If some one wishes to be updated with hottest technologies after that he must be visit this site and be up to date daily.

  • Penzu

    Heello would you mind sharing which blog platform you're using? I'm planning to start my own blog in the near future but I'm having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then moost blogs and I'm looking for something completely unique. P.S Apologies forr being off-topic butt I had to ask!

  • Yupoo Fendi

    Thanks to my father who shared with me regarding this webpage, this website is genuinely amazing.

  • Doug Shume

    Hi, I have an overflow of customers that I'd like to send to you but I want to make sure you can handle more leads, let me know if you'd like me to send you more info.

  • SuperWind

    zh.us.to 有效
    kms.03k.org 有效
    kms.chinancce.com
    kms.shuax.com 有效
    kms.dwhd.org 有效
    kms.luody.info 有效
    kms.digiboy.ir 有效
    kms.lotro.cc 有效
    www.zgbs.cc 有效
    cy2617.jios.org 有效

  • 三三

    @         权限问题,试试sudo 再加命令。

  •         

    你好提示Permission denied 怎么办啊

日历

2024年05月

   1234
567891011
12131415161718
19202122232425
262728293031 

文章目录

上一张 下一张