Skip to main content

Clam AV weekly cron job to scan last 7 days of files in home3/* home5/*

Comments

2 comments

  • cPRex Jurassic Moderator
    Hey there! I'm not sure that "ctime -1" is going to give you the results you want. You might want to try "mtime 7" instead of that ctime option, as that would grab any files between now and 7 days old. You can also just run the first half of the command, slightly modified, to see if the output is what you expect, before passing it to the clamscan commands: find /home4/*/mail/ /home5/*/mail/ -mtime 6 -type f > output.file
    That would create a file named "output.file" so you can examine the contents.
    0
  • Nermin
    I think I've did it with this two cron jobs: 0 5 * * 1-6 find /home4/*/mail /home5/*/mail -ctime -8 -type f -print > /home3/lista_8_dana.txt | mail -s "List is created" update@fmm.ba 30 5 * * 7 /usr/local/cpanel/3rdparty/bin/clamscan --infected --remove --scan-mail --phishing-sigs --phishing-scan-urls --algorithmic-detection --scan-pe --scan-elf --scan-ole2 --scan-pdf --scan-html --file-list=/home3/lista_8_dana.txt | mail -s "Scanning completed" update@fmm.ba
    0

Please sign in to leave a comment.