如果我們在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表空間和數據文件的關係,否則拒絕申請