ClamAV is "the (only...) Antivirus" when referring to Linux.

To scan from the cli is very easy:

cd /dir/to/scan
root@srvr101 [/home/guido]# clamscan -r -v -i --bell  > clamscan-guido-infected.log 2>clamscan-guido-error.log &

-r Stands for recursive.

-v Is for verbose.

-i Prints the infected files only.

--bell sounds a bell for every positive result found.

The infected scan result will be put inside the clamscan-guido-infected.log and the standard error log will be written inside clamscan-guido-error.log.

The & will execute the scan on the background and the prompt will allow you to do whatever you wish during the scan.

Rate this post