大家好

有時候在linux上產生很多測試檔案
但是又想刪除特定 資料夾中的特定類型資料
例如暫存檔案
可以參考以下指令

 

find 資料夾名稱/ -name '*.tmp' -delete

 

find 是搜尋指令
-name 是搜尋檔案名稱
-delete 就是刪除

給大家參考囉