歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix教程 >> FreeBSD 文件和目錄查找

FreeBSD 文件和目錄查找

日期:2017/2/27 17:39:44   编辑:Unix教程
FreeBSD

0. 前言
檔案搜尋,對於一個新系統來說,可能沒有很大的用途;
但是對於一個舊系統,檔案及文件越來越多, 這時就必須要用搜尋來找尋檔案了。

1.which
指令 : which ( locate a program file in the user's path )
語法 : which program
用途 : 從使用者的執行路徑,尋找執行文件。
實例 : 搜尋 cd 的位置。

2.whereis 指令 : whereis ( locate programs )
語法 : whereis [ -bms ] program
用途 : 尋找原始程序數據夾 (source directory), 二進制程序 (binary). 使用手冊 (manuals)
參數 : -b 搜尋二進制程序 ; -m 搜尋使用者手冊; -s 搜尋原始程序的數據夾
實例 :
(1) 搜尋 cd 使用者手冊的位置。

( 2) 搜尋 cd 執行文件的位置。

Copyright © Linux教程網 All Rights Reserved