定时清除odps 的tomcat日志
1.使用odps 用户 执行操作
vi /opt/mkey3g/wwwroot/split_tomcat_log.sh
最后一行添加
find /opt/tomcat/logs -type f -mtime +6 | xargs rm -f >/dev/null 2>&1
保存退出编辑
备注:+6 是超过6天的日志
2.使用root 用户执行操作
killall -e cron
启动cron /usr/sbin/cron
1.使用odps 用户 执行操作
vi /opt/mkey3g/wwwroot/split_tomcat_log.sh
最后一行添加
find /opt/tomcat/logs -type f -mtime +6 | xargs rm -f >/dev/null 2>&1
保存退出编辑
备注:+6 是超过6天的日志
2.使用root 用户执行操作
killall -e cron
启动cron /usr/sbin/cron
发布于 2014-12-11 11:41
全部 0条评论