David C. Rankin wrote:
I went ahead a created a script to check log file size that you can add to the root cron tab to run once daily. I called the script cklogsize, and a cron entry to run it at 10 minutes after 4 am each day would be:
10 4 * * * /home/david/linux/scripts/log/cklogsize zypp-refresh.log
The script and explanation follows. To make sure you don't have any line wrap problems, you can also download a copy here:
<snip> Looks like there is also a much easier way than rolling a custom script and crontab. Just edit /etc/logrotate.d/zypper.lr and add a section for /var/log/zypp-refresh.log. I just copied the entry for /var/log/zypper.log. When you are done, the file should look like: /var/log/zypper.log { compress dateext notifempty missingok nocreate maxage 60 rotate 99 size 10M } /var/log/zypp-refresh.log { compress dateext notifempty missingok nocreate maxage 60 rotate 99 size 10M } Oh well, a fun hour spent on the script itself. Cheers. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org