清空目錄下文件內容

1.find . -type f |awk '{print "cat /dev/null > "$0}'|bash
2.find . -type f |awk '{printf "echo -n "" > "$0}'|bash
3.find . -type f |xargs -i echo "" \> {}|bash
4.find . -type f |xargs -i sed -i '1,$'d {}
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章