Hi, Please find attached a script to rotate clamd log file.
One may call the script from crontab, like this: 0 1 * * * /local/adm/bin/rotate-clamd-log.sh /var/adm/clamav clamd.log 1000000 10 /etc/init.d/clamd >/dev/null 2>/dev/null The invokation syntax is: # /local/adm/bin/rotate-clamd-log.sh usage: rotate-clamd-log.sh log-dir log-file max-size max-preserve init-script example: rotate-clamd-log.sh /var/adm/clamav clamd.log 1000000 5 /etc/init.d/clamd # The init-script is used to stop/start clamd. I suppose it could be improved to send a signal to clamd. Regards, Everton
rotate-clamd-log.sh
Description: Bourne shell script