You are on page 1of 1

1. create file /etc/logrotate.

d/your_name
paste all contents:
/tmp/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
}
2. /etc/init.d/rsyslog restart
/etc/init.d/crond restart
3. logrotate -f /etc/logrotate.d/your_name
that's done

You might also like