Posts

Showing posts from 2015

How to implement Log File Rotation in Linux Servers

NB: We are using CentOS Servers Switch to root user cd /etc/logrotate.d/  (by default we will be having this directory in our server) create a new file project-logs   vi project-logs Add the following piece of code to this file             /folder-path-of-your-log/*.log {                size=10M                missingok                rotate 20                compress                delaycompress                notifempty                copytruncate               daily           }       5.   logrotate -f /etc/logrotate.d/        This will create new log ...