You need to install logratate Sudo apt-get update Sudo apt-get install logrotate For confirm logrotate successfully installed or not run : logrotate Default logrotate configuration are present in : /etc/logrotate.conf Example : /var/log/tomcat7/catalina.out { copytruncate weekly rotate 52 compress missingok create 640 tomcat7 adm size 5M } What does it means : Copytruncate : Truncate the original log file to zero size in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus might continue writing (appending) to the previous log file forever. Note that there is a very small time slice between copying the file and truncating it, so some logging data might be lost. When this option is used, the create option will have
Loves learning and writing latest Trends.