Click Technology

Linux, Windows, Mac it's all good

Rotate logs

September13

Sometimes you will need to force logs to be rotated. No problem. This can be done manually. Here’s the command.

logrotate -v -f /etc/logrotate.d/rsyslog

This will compress and rotate all the significant logs.

To check which logs your machine will rotate, examine the file /etc/logrotate.d/rsyslog

/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages

Done.

posted under Linux Tips | No Comments »

This is my website for short blog posts and interesting materials that are noteworthy or have some handy-tip value.