In a server environment it’s quite important to keep the size of log files in track. Everyone knows the problem of increasing file sizes in this matter. Therefore the logrotate daemon may help you to solve this problem. Files are rotated ore removed in a defined time slot to gzipped files for X times. You can find the configuration in /etc/logrotate.d.
In this directory you can find already given config files for some linux services.
This is an example of the samba logrotate in /etc/logrotate.d/samba:
/var/log/samba/log.smbd {
weekly
missingok
rotate 7
postrotate
invoke-rc.d --quiet samba reload > /dev/null
endscript
compress
notifempty
}











