How to do malware scan in a server through Clamscan ?

Posted: July 28, 2013 in cPanel

————————————————————————————————————–

Login to the server via SSH

Run the following commands in ” screen ” . ( Keep Your Processes Running Despite A Dropped Connection )

# clamnscan  -i  -r  –log=/var/log/clamscanlog /*   –> It will help you to do an entire system scanning

For custom directories scanning ,

# clamscan -i -r  –log=/var/log/clamscanlog2  ” directory to scan” 

Example: #  clamscan -i -r –log=/var/log/clamscanlog3  /home/*

Options used in the above commands with its description :

-i  (–infected )        >>    Only print infected files

-r  (–recursive[=yes/no(*)])    >>     Scan subdirectories recursively

–log  (-l FILE )          >>         Save scan report to FILE

—————————————————————————————————————

Leave a comment