查找大文件并清空
cat /data/application/scripts/autoclean_nohup.out.sh

#!/bin/bash

#定期清理日志文件超过1G--nohup.out
#by licb @20190222
for i in `find ./ -type f -size +1000M -name nohup.out`
do 
cat /dev/null > $i
ls -lh $i
done

[root@netshop-vm2 scripts]# crontab -l
* * * * 7 root /bin/bash /data/application/scripts/autoclean_nohup.out.sh

查找大文件并删除:
find ./ -type f -size +1000M -name nohup.out -exec rm -rf {}\;

find ./ -type f -size +1000M -name nohup.out | xargs ls -l