logs脚本
2018-05-15 本文已影响0人
养码哥
#!/bin/bash
log_path=/usr/local/apache-tomcat-6.0.43/logs
d=`date +%Y-%m-%d`
d2=`date -d'2 day ago' +%Y-%m-%d`
cd ${log_path} && cp catalina.out /usr/local/logs/catalina.out.$d.log
echo > catalina.out
rm -rf /usr/local/logs/catalina.out.${d2}.log
- 邮箱:ithelei@sina.cn
- 技术讨论群:687856230
- GoodLuck