Logrotate

logrotate is a tool to periodically rotate (archive), and optionally compress and/or mail historic log files.