通過檔案的inode號洗掉檔案
先用ls -i 找出要洗掉檔案的inode 號
ls -i |grep xxxxxx|awk '{print $2}'|xargs -i rm -f {}
xxxxxx為檔案的 inode 號通過檔案大小洗掉檔案
洗掉當前目錄以及所有子目錄下的檔案大小為零的檔案
find ./ -size 0 -exec rm {} \;洗掉當前目錄下檔案大小為零的檔案(子目錄不洗掉)
find ./ -maxdepth 1 -empty -type f -print -delete #-maxdepth 指定目錄層級
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/146245.html
標籤:Linux
上一篇:CentOS 7 離線環境安裝nginx時報錯:./configure: error: C compiler cc is not found
下一篇:linux bash變數作用域
