0. 前言
檔案搜尋,對于一個(gè)新系統(tǒng)來說,可能沒有很大的用途;
但是對于一個(gè)舊系統(tǒng),檔案及文件越來越多, 這時(shí)就必須要用搜尋來找尋檔案了。
1.which
指令 : which ( locate a program file in the user's path )
語法 : which program
用途 : 從使用者的執(zhí)行路徑,尋找執(zhí)行文件。
實(shí)例 : 搜尋 cd 的位置。
2.whereis 指令 : whereis ( locate programs )
語法 : whereis [ -bms ] program
用途 : 尋找原始程序數(shù)據(jù)夾 (source directory), 二進(jìn)制程序 (binary). 使用手冊 (manuals)
參數(shù) : -b 搜尋二進(jìn)制程序 ; -m 搜尋使用者手冊; -s 搜尋原始程序的數(shù)據(jù)夾
實(shí)例 :
(1) 搜尋 cd 使用者手冊的位置。
( 2) 搜尋 cd 執(zhí)行文件的位置。
新聞熱點(diǎn)
疑難解答