定时清除odps 的tomcat日志

admin
admin 这家伙很懒,还没有设置简介...

0 人点赞了该文章 · 366 浏览

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

免责声明:

本文由 admin 原创发布于 优势智云 ,著作权归作者所有。

登录一下,更多精彩内容等你发现,贡献精彩回答,参与评论互动

登录! 还没有账号?去注册

暂无评论

All Rights Reserved Powered BY WeCenter V4.0.3 © 2026 粤ICP备17102936号