Installing ClamAV on Fedora live machine to scan for viruses

In learning to clean infected computer I am learning about ClamAV using a Fedora 18 liveCD

I used this link to get Clam installed.

http://ittechnikt3.wordpress.com/2011/04/23/how-to-installuse-clamav-on-fedora-14/

First I updated my Fedora LiveCD.

yum update -y

Then I installed ClamAV.

yum install clamav clamav-update

I used VI to edit the Clam config file .

vi /etc/freshclam.conf

Edit these lines.

1-add a # in front of “Example” (to comment/disable it)

2-uncomment (remove the # in front of) the line “DNSDatabaseInfo current.cvd.clamav.net

3-Localized the virus database source to the nearest one by adding a new line “DatabaseMirror db.XY.clamav.net”, and changing XY by your 2 characters country code.

4-be sure that the following line is uncomment

DatabaseMirror database.clamav.net

Shift ZZ to save and close the file and return back to the terminal window.

Then run “freshclam” in terminal. This will take about 20 minutes.

I used the program “Files” to locate where the hard drive mounted to. In this case it was “/run/media/liveuser/OS”. “OS” was the label on the hard drive. I used Terminal to navigate to the that drive and started my clamscan.

In terminal type “clamscan -r” to scan recursively(all files and directories) and hit enter.

There are more options that just scanning. Here is link that gives some fine examples.

http://askubuntu.com/questions/250290/how-do-i-scan-for-viruses-with-clamav

sudo freshclam

Then you can scan for viruses.

 clamscan OPTIONS File/Folder 

Examples:

  • 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 /
    
  • To check files in the all users home directories:
    clamscan -r /home
    
  • To check files in the USER home directory and move infected files to another folder:
    clamscan -r --move=/home/USER/VIRUS /home/USER
    
  • To check files in the USER home directory and remove infected files (WARNING: Files are gone.):
    clamscan -r --remove /home/USER
    
  • To see more options:
    clamscan --help