1. Create cron file:
vim /etc/cron.daily/manual_clamscan

Add the following to the file above. Be sure to change SCAN_DIR to the directory that you want to scan:

#!/bin/bash
SCAN_DIR="/home"
LOG_FILE="/var/log/clamav/manual_clamscan.log"

/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE

Give our cron script executable permissions:

chmod +x /etc/cron.daily/manual_clamscan

You can even run the above script to ensure that it works correctly.

Thanks to CentOSBlog :) Let me know if you have any query .Feel free to open ticket for the same .

Дали Ви помогна овој одговор? 0 Корисниците го најдоа ова како корисно (3 Гласови)