• Linux 查看软件位置的命令


     

     

    如果我们在Linux 系统上安装了某个软件,我们可以通过如下的三种方式来确定。

     

    一.        Which 命令

    Shell which 命令可以找出相关命令是否已经在搜索路径中。 如:

     

    [root@localhost ~]# which gcc

    /usr/bin/gcc

     

    二.        Whereis 命令

    Whereis 命令搜索更大范围的系统目录,和Shell 的搜索路径无关。 要注意,有些系统上的which 命令不显示用户没有执行权限的文件。

     

    [root@localhost ~]# which ipppd

    /sbin/ipppd

    [root@localhost ~]# whereis ipppd

    ipppd: /sbin/ipppd /usr/sbin/ipppd /usr/share/man/man8/ipppd.8.gz

     

    三.        Locate 命令

    该命令会先考察预先编译好的一个文件系统的索引,以此确定与特定模式相匹配的文件名。 它搜索的并不特定与命令或者软件包,而是能够找到的任何类型的文件。

     

    Locate 的数据库库通常由updatedb 命令在每天晚上重新生成,这个命令由cron来运行。 因此,执行一次locate 的结果不是总能够反映出文件系统新近的变化。

     

    比如查看头文件signal.h

     

    [oracle@localhost ~]$ locate signal.h

    warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory

    warning: You need to run the 'updatedb' command (as root) to create the database.

    Please have a look at /etc/updatedb.conf to enable the daily cron job.

    [oracle@localhost ~]$ su - root

    Password:

    [root@localhost ~]# updatedb

    [root@localhost ~]# locate signal.h

    /usr/src/kernels/2.6.9-78.EL-i686/include/linux/signal.h

    /usr/src/kernels/2.6.9-78.EL-i686/include/asm-i386/signal.h

    /usr/src/kernels/2.6.9-78.EL-smp-i686/include/linux/signal.h

    /usr/src/kernels/2.6.9-78.EL-smp-i686/include/asm-i386/signal.h

    /usr/src/kernels/2.6.9-78.EL-hugemem-i686/include/linux/signal.h

    /usr/src/kernels/2.6.9-78.EL-hugemem-i686/include/asm-i386/signal.h

    /usr/share/doc/SDL-devel-1.2.7/html/sdlcondsignal.html

    /usr/share/man/man0p/signal.h.0p.gz

    /usr/include/valgrind/pub_tool_libcsignal.h

    /usr/include/asm/signal.h

    /usr/include/sys/signal.h

    /usr/include/linux/signal.h

    /usr/include/glib-2.0/gobject/gsignal.h

    /usr/include/boost/signal.hpp

    /usr/include/signal.h

     

     

     

     

     

    整理自《Linux 系统管理手册》

    ------------------------------------------------------------------------------

    Blog http://blog.csdn.net/tianlesoftware

    网上资源: http://tianlesoftware.download.csdn.net

    相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

    DBA1 群:62697716(); DBA2 群:62697977()

    DBA3 群:62697850   DBA 超级群:63306533;    

    聊天 群:40132017

    --加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

    道森Oracle,国内最早、最大的网络语音培训机构,我们提供专业、优质的Oracle技术培训和服务! 我们的官方网站:http://www.daosenoracle.com 官方淘宝店:http://daosenpx.taobao.com/
  • 相关阅读:
    python 代码编写环境及编辑器配置
    升级gradle:Could not find method jackOptions() for arguments
    Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant: debug
    ecplice 如何智能提示(旧)
    seo 回忆录百度基本概念(一)
    正则表达针对html(九)
    读Pyqt4教程,带你入门Pyqt4 _002
    [Objective-c] 002_对象 类 变量 方法
    SD.Team字符表情集大全(持续更新中..)
    SD.Team主题形象小人偶
  • 原文地址:https://www.cnblogs.com/tianlesoftware/p/3609941.html
Copyright © 2020-2023  润新知