Professional Documents
Culture Documents
Using ClamAV in The Terminal
Using ClamAV in The Terminal
Using ClamAV in The Terminal
Proxy
If you are using a http proxy to connect to the internet you will have to edit the file
/etc/clamav/freshclam.conf adding:
HTTPProxyServer serveraddress
HTTPProxyPort portnumber
Scan Files
Use clamscan.
Examples:
To check files in the all users home directories: clamscan -r /home
To check all files on the computer, displaying the name of each file: clamscan -r /
To check all files on the computer, but only display infected files and ring a bell when found:
clamscan -r --bell -i /
When ClamAV has scanned all the files you asked it to, it will report a summary:
----------- SCAN SUMMARY ----------Known viruses: 33840
Scanned directories: 145
Scanned files: 226
Infected files: 1
Data scanned: 54.22 MB
I/O buffer size: 131072 bytes
Time: 20.831 sec (0 m 20 s)
ClamAV can only read files that the user running it can read. If you want to check all files on the
system, use the sudo command (see UsingSudo for more information).
Schedule ClamAV
You can use the at command to schedule clamscan or freshclam. For example:
at 3:30 tomorrow
at>clamscan -i /home/user | mail user@example.com
at> <CTRL-D>
job 3 at 2005-04-28 03:30
You have now scheduled a ClamAV scan to happen on your home directory at 3:30 AM tomorrow.
The output (showing only infected files) will be sent to you by e-mail.