Hostxpeed
Login Get Started →
Security

How to Scan for Malware

4 min read
29 views
Jun 11, 2026

Step 1: Scan Home Directory

clamscan -r /home

Step 2: Scan Whole System (Exclude Common Directories)

sudo clamscan -r / --exclude-dir=/sys --exclude-dir=/proc --exclude-dir=/dev

Step 3: Scan and Remove Infected Files

sudo clamscan -r --remove /home

Step 4: Generate Log File

clamscan -r /var/www --log=/var/log/clamav/scan.log

Was this article helpful?