天天看点

清空目录下文件内容

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

继续阅读