Hiya, check out logrotate and directory /etc/logrotate.d, I tend to have 7 daily logs so always have a week, and then if necessary archive (never do, but you can do it via logrotate if you want), but its fairly flexible to do most tasks.