天天看點

清空目錄下檔案内容

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 {}

繼續閱讀