簡明Linux命令列筆記 locate

2021-09-06 07:45:08 字數 473 閱讀 1191

在mlocate資料庫中搜尋條目

locate [option]pattern

pattern

是locate

需要搜尋的檔名或者正規表示式

-i              忽略大小寫

-r              使用正規表示式搜尋

locate

$ locate

mlocate.db

/usr/share/man/man5/mlocate.db.5

.gz/var/lib/mlocate/mlocate.db

/var/lib/mlocate/mlocate.db.6e72yx

1.locate 程式搜尋的是已更新在mlocate.db中的內容,該資料會每天自動更新

2.如果搜尋不到已存在的檔案可以先用updatedb來更新資料庫

簡明Linux命令列筆記 cat

連線或顯示檔案 cat options file list file list 是cat 要處理的單個檔案路徑名或多個檔案路徑名列表,如果不指定任何引數或指定乙個連字元 代替檔名,cat就從標準輸入讀取資訊,然後列印 e 在每行結束處顯示 n 對輸出的所有行編號 b 對輸出的非空所有行編號 s 刪除...

簡明Linux命令列筆記 ln

為檔案建立鏈結 ln options existing file new link ln options existing file list directory ln可以為乙個或多個檔案建立硬鏈結或符號 軟 鏈結。對於目錄,只能建立符號鏈結,而不能建立硬鏈結 引數第一種格式 existing fi...

簡明Linux命令列筆記 tar

將檔案儲存到歸檔檔案中或者從歸檔檔案中獲取原始檔案,以及為檔案建立歸檔檔案 tar option modifiers file list file list 是tar 進行歸檔和提取的檔案路徑名列表 只能使用下面的某乙個選項來指定tar要執行的動作。可以通過在選項後面跟乙個或多個修飾符來改變該選項的...