Tomcat: deleting content of “logs” and “tmp” directories

loggingtmptomcat

I have noticed that "logs" and "tmp" content take 36GB and 21GB respectively. I need to free up some disk space and currently wondering is it vise to clean them.

Thanks!

Best Answer

Delete logs older than 7 days.

find tomcat/logs/ -mtime +7 -print0 | xargs -r -0 rm -rf

You probably want to add this as a cronjob too.

Before deleting temp-files, you should make sure that nothing is holding them open.

Related Topic