April 3, 2020 / Nirav S
# sudo apt-get update # sudo apt-get install clamav clamav-daemon -y
# systemctl stop clamav-freshclam # freshclam
# systemctl start clamav-freshclam
# clamscan --help
# man clamscan
# clamscan [options] [file/directory/-]
-h, --help Print help information and exit. # clamscan -h -V, --version Print version number and exit. # clamscan -V -i, --infected Only print infected files. # clamscan -i /home/ -o, --suppress-ok-results Skip printing OK files --bell Sound bell on virus detection. # clamscan -r --bell -i /home -d FILE/DIR, --database=FILE/DIR Load virus database from FILE or load all virus database files from DIR. # clamscan -d /tmp/newclamdb -r /tmp -l FILE, --log=FILE Save scan report to FILE. -r, --recursive Scan directories recursively. All the subdirectories in the given directory will be scanned. # clamscan -r --remove / -f FILE, --file-list=FILE Scan files listed line by line in FILE. --remove[=yes/no(*)] Remove infected files. Be careful as this removes the file completely. # clamscan -r --remove /home/USER --move=DIRECTORY Move infected files into DIRECTORY. Directory must be writable for the user or unprivileged user running clamscan. # clamscan -r --move=/home/USER/VIRUS /home/ --copy=DIRECTORY Copy infected files into DIRECTORY. Directory must be writable for the user or unprivileged user running clamscan. # clamscan -r --copy=/home/USER/VIRUS /home/
man clamscan
# nice -n 15 clamscan && clamscan -ir /
# cpulimit -z -e clamscan -l 50 & clamscan -ir /
Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.