Exemple: /etc/logrotate.d/auditd
xxxxxxxxxx
/var/log/auditd
{
rotate 7
# Do not rotate if file is smaller than "mimisize"
minisize 10
# Rotate if file is bigger than "maxsize"
maxsize 50
daily
missingok
notifempty
compress
delaycompress
}
Don't forget to add a cron to run logrotate every x min or hour.
xxxxxxxxxx
0 * * * * /usr/bin/logrotate -f /etc/logrotate.conf