find 找到指定文件并清空

Posted on Posted in command

find 找到指定文件并清空

# 方法一
find ./ -iname "filename" -exec \cp /dev/null {} \;
方法二
find ./ -iname "filename" | awk '{print "echo > "$0}'| bash
» 转载请注明来源:呢喃 » find 找到指定文件并清空

Leave a Reply

Your email address will not be published. Required fields are marked *

nine − 2 =