LogRotate

Add a service to logrotate

vi /etc/logrotate.d/name_of_file

/var/log/some_dir/somelog.log {
        su root root
        missingok
        notifempty
        compress
        size 5M
        daily
        create 0600 root root
}

Force run a logrotate
logrotate -f /etc/logrotate.conf

Once it's all done no need to do anything else, log rotate already runs in /etc/cron.daily/logrotate


Revision #1
Created 2017-07-27 20:54:24 UTC by Dave
Updated 2017-07-27 21:04:42 UTC by Dave