1. Remove all logs of manager& admin
Remove 90 days old logs Backup logs greater that 35MB
#!/bin/bash
rm -rf /app/tomcat-6.0.18/logs/*manager* /app/tomcat-6.0.18/logs/*admin*
find /cda1-logs-backups -name ‘*.gz’ -mtime +90 -exec rm {} \;
echo “Initiating logrotate `date +%F-%A`” >> /app/tomcat-6.0.18/logs/diskutil.log
cd /app/tomcat-6.0.18/logs/
siz_catalina=`/bin/ls -l catalina.out | /bin/awk ‘{ print $5 }’`
if [ $siz_catalina -ge “3600000” […]
Recent Comments