From 17e3bc0c750a4d9da91cca6a1cd8266452ef8971 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Tue, 5 Dec 2023 15:57:53 +0100 Subject: [PATCH] refactor --- technology/applications/clamav.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/technology/applications/clamav.md b/technology/applications/clamav.md index cfc9be4..942f8ce 100644 --- a/technology/applications/clamav.md +++ b/technology/applications/clamav.md @@ -4,9 +4,8 @@ os: linux arch-wiki: https://wiki.archlinux.org/title/ClamAV website: https://www.clamav.net/ --- -#refactor + # ClamAV -[Arch Wiki](https://wiki.archlinux.org/title/ClamAV) Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates. Because ClamAV's main use is on file/mail servers for [Windows](../windows/Windows.md) desktops, it primarily detects [Windows](../windows/Windows.md) viruses and malware with its built-in signatures. ## Usage @@ -27,8 +26,22 @@ Start/Enable`clamav-freshclam.service` so that the virus definitions are kept r ### Starting the daemon -**Note:** -- You will need to run `freshclam` before starting the service for the first time or you will run into trouble/errors which will prevent ClamAV from starting correctly. -- The daemon is not needed if you only want to perform stand-alone scans. See [Scan for viruses](https://wiki.archlinux.org/title/ClamAV#Scan_for_viruses) below. +> **Note:** +> - You will need to run `freshclam` before starting the service for the first time or you will run into trouble/errors which will prevent ClamAV from starting correctly. +> - The daemon is not needed if you only want to perform stand-alone scans. -The service is called `clamav-daemon.service`. \ No newline at end of file +The service is called `clamav-daemon.service`. + +### Scanning for viruses +`clamscan` can be used to scan certain files, home directories, or an entire system: +```shell +clamscan myfile +clamscan --recursive --infected /home/archie +clamscan --recursive --infected --exclude-dir='^/sys|^/dev' / +``` + +If you would like `clamscan` to remove the infected file add to the command the `--remove` option, or you can use `--move=/dir` to quarantine them. + +You may also want `clamscan` to scan larger files. In this case, append the options `--max-filesize=4000M` and `--max-scansize=4000M` to the command. '4000M' is the largest possible value, and may be lowered as necessary. + +Using the `-l /path/to/file` option will print the `clamscan` logs to a text file for locating reported infections. \ No newline at end of file