Note that most of the options are simple switches which enable or disable some features. # clamscan -r -copy=/home/USER/VIRUS /home/ Directory must be writable for the user or unprivileged user running clamscan. # clamscan -r -move=/home/USER/VIRUS /home/ -copy=DIRECTORYĬopy infected files into DIRECTORY. # clamscan -r -remove /home/USER -move=DIRECTORY Be careful as this removes file completely. # clamscan -r -remove / -f FILE, -file-list=FILE All the subdirectories in the given directory will be scanned. # clamscan -d /tmp/newclamdb -r /tmp -l FILE, -log=FILE Load virus database from FILE or load all virus database files from DIR. # clamscan -r -bell -i /home -d FILE/DIR, -database=FILE/DIR # clamscan -i /home/ -o, -suppress-ok-results # clamscan -no-summary /home/ -i, -infected # clamscan -V ClamAV 0.100.1/25021/Tue Oct 9 15:52:08 2018 -no-summaryĭo not display summary at the end of scanning. Some of the clamscan command options and their example usage is illustrated below -h, -help Man clamscan Clamscan CLI Options and Example Usageįrom the man pages, the clamscan command syntax is: clamscan To see the clamscan command line usage, run either of the commands below. ClamAV comes with a command line utility called clamscan that scans files and directories for viruses. You are now ready to use ClamAV to protect your system against viruses. Once the virus database update is done, start the clamav-freshclam service so it keeps updating the signature database in the background whenever. Stop the clamav-freshclam service and run the freshclam command to manually update the signatures database. Once the installation is complete, you should update the ClamAV signatures.
apt updateĪpt install clamav clamav-daemon -y Update the ClamAV Singature Database ClamAV is available on Ubuntu repositories and thus you can run the command below to install it.