Clam Antivirus (ClamAV) - A few usage notes

In Debian Jessie 8.3 I wanted to scan a Windows partition before booting it, to reduce the risks of getting an infected system.

It turned out there was at least one antivirus program supplied in the repositories - Clam Antivirus.

It installs like this:
sudo bash
apt-get install clamav

It must be updated, and it does it by itself silently directly after install using the freshclam command which also can be run on it's own.

To check if the update is done, have a look in the log for freshclam:
cat /var/log/clamav/freshclam.log

When the update is done you can scan files.
But there are some parameters that are important. You need to specify recursive mode and you need to supply a log file. If not it will only walk the current directory and only tell you a summary at the end of the file list. So:

clamscan -i -l /path/to/desired/logfile.txt -r /what/to/scan/for/viruses/

This is a personal note. Last updated: 2016-03-19 10:27:11.


Don't forget to pay my friend a visit too. Joakim