To run a test in verberose mode that will write a report to /var/log/clamscan.log, enter this at the command line.
clamscan -r -l /var/log/clamscan.log /
To run the same test in quiet mode, run this at the command line.
clamscan -r --quiet -l /var/log/clamscan.log /
To update clamav database, run this at the command line.
/usr/bin/freshclam --quiet -l /var/log/clamav-update.log
If you would like to have all this ran everyday, you can create a executable script and place it in the /etc/cron.daily. To put this all together follow these steps. Create logfiles
vim clamscan.log
vim clam-update.log
vim clam-update.log
Create shell scripts
vim /etc/cron.daily/avscan
#!/bin/bash
# Update the database
/usr/bin/freshclam --quiet -l /var/log/clamav-update
# Scan system for viruses
clamscan -r --quiet -l /var/log/clamscan.log /
# Update the database
/usr/bin/freshclam --quiet -l /var/log/clamav-update
# Scan system for viruses
clamscan -r --quiet -l /var/log/clamscan.log /
Make /etc/cron.daily/avscan executable
chmod 774 /etc/cron.daily/avscan