在linux中輸入locate出現(xiàn)locate can not stat()的錯誤
locate:查找命令,其實是 find 指定路徑 -name 文件名 另外一種寫法,但是這種方式查找文件速度明顯快于find,關(guān)鍵原因在于它不搜索具體的目錄,而是找一個數(shù)據(jù)庫/var/lib/locatedb,這個數(shù)據(jù)庫中含有本地所有文件信息,每天自動更新一次,故而使用locate指令查不到最新變化的文件,建議使用locate之前,手動更新數(shù)據(jù)庫updatedb
# 手動更新數(shù)據(jù)庫
updatedb
# 再次查詢數(shù)據(jù)
locate a.md

20211205210827
在linux中輸入locate出現(xiàn)locate: can not stat ()的錯誤
在linux中輸入locate出現(xiàn)locate