查看指定文件
find /tmp/maomao/dir -size +100M -exec ls -lh {} ;
find *.jpg -size +100k -exec ls -lh {} ;
删除指定文件
find /tmp/maomao/dir -size +100M -exec rm {} ;
find *.jpg -size +100k -exec rm {} ;
复制文件到指定目录
find . -iname *.class -exec cp {} mm ;
cp: ‘./mm/tt2.class’ and ‘mm/tt2.class’ are the same file
清空文件内容
echo “” > /tmp/maomao/mm.txt
clear > /tmp/maomao/mm.txt
true > /tmp/maomao/mm.txt
false > /tmp/maomao/mm.txt
: > /tmp/maomao/mm.txt