批量清空当前目录中所有log文件中的内容

for i in `find . -name "*.log"`; do cat /dev/null >$i; done

或者

for i in `find . -name "*.log"`; do >$i; done

编程技巧