CLAMAV Scan Cheatsheet

This forum is for the posting and reading of tutorials.
Post Reply
User avatar
kheny22
Apprentice
Posts: 8
Joined: Fri May 01, 2020 8:37 pm

CLAMAV Scan Cheatsheet

Post by kheny22 »

:!: At first you have to update the virus definitions with:

Code: Select all

# freshclam
Then you can scan for viruses.

Code: Select all

# clamscan OPTIONS File/Folder
To check all files on the computer, displaying the name of each file:

Code: Select all

# clamscan -r /
To check all files on the computer, but only display infected files and ring a bell when found:

Code: Select all

# clamscan -r --bell -i /
To check files in the all users home directories:

Code: Select all

$ clamscan -r /home
To check files in the USER home directory and move infected files to another folder:

Code: Select all

$ clamscan -r --move=/home/USER/VIRUS /home/USER
To check files in the USER home directory and remove infected files (WARNING: Files are gone.):

Code: Select all

$ clamscan -r --remove /home/USER
To see more options:

Code: Select all

$ clamscan --help
scan files in jon's home directory, only display viruses, and move viruses to 'VirusVault':

Code: Select all

$ clamscan -r -i --move=/home/jon/VirusVault /home/jon

Post Reply