sh定时清理日志
#!/bin/bash for i in `find /home/wb/business/hewaApi/runtime/ -mtime +3 -name "*.log"` do echo $i rm -rf $i done for i in `find /home/wb/business/hewaOperateApi/runtime/ -mtime +3 -name "*.log"` do echo $i rm -rf $i done for i in `find /home/wb/business/hewaMc/runtime/ -mtime +3 -name "*.log"` do echo $i rm -rf $i done for i in `find /home/wb/business/hewaObsApi/runtime/ -mtime +3 -name "*.log"` do echo $i rm -rf $i done for i in `find /home/wb/business/hewaDataLargeScreen/runtime/ -mtime +3 -name "*.log"` do echo $i rm -rf $i done
标签:log,find,echo,sh,done,mtime,home,日志,定时 From: https://www.cnblogs.com/yangzailu/p/16721987.html