Deleting tomcat log files automatically for every 2 days. -
i automatically delete tomcat log files every 2 days.to that, wrote script in /etc/logrotate.d/tomcat not working.i using ubuntu 16.04 dist.
/opt/tomcat/logs/*.*.* { daily missingok rotate 2 missingok nomail postrotate /usr/bin/find /opt/tomcat/logs/ -name "*.*.*" -type f - mtime +2 -exec rm {} \; endscript }
suggest me answres delete tomcat logs. please help.
just use simple cronjob execute simple bash-file removes files in wished directory
https://wiki.ubuntuusers.de/cron/
rm -r /opt/tomcat/logs/* #or whatever want delete
Comments
Post a Comment