2008-12-30 10:33:43 +00:00
.TH "clamscan" "1" "December 30, 2008" "ClamAV @VERSION@" "Clam AntiVirus"
2003-07-29 15:37:11 +00:00
.SH "NAME"
.LP
2007-02-12 18:38:32 +00:00
clamscan \- scan files and directories for viruses
2003-07-29 15:37:11 +00:00
.SH "SYNOPSIS"
.LP
clamscan [options] [file/directory/\- ]
.SH "DESCRIPTION"
.LP
2007-02-12 18:38:32 +00:00
clamscan is a command line anti\- virus scanner.
2003-07-29 15:37:11 +00:00
.SH "OPTIONS"
.LP
2008-12-30 10:33:43 +00:00
Most of the options are simple switches which enable or disable some features. Options marked with [=yes/no(*)] can be optionally followed by =yes/=no; if they get called without the boolean argument the scanner will assume 'yes'. The asterisk marks the default internal setting for a given option.
2003-07-29 15:37:11 +00:00
.TP
\fB \- h, \- \- help\fR
2004-02-20 15:49:29 +00:00
Print help information and exit.
2003-07-29 15:37:11 +00:00
.TP
\fB \- V, \- \- version\fR
2004-02-20 15:49:29 +00:00
Print version number and exit.
2003-07-29 15:37:11 +00:00
.TP
\fB \- v, \- \- verbose\fR
2003-11-11 22:10:27 +00:00
Be verbose.
.TP
\fB \- \- debug\fR
2007-02-12 18:38:32 +00:00
Display debug messages from libclamav.
2003-07-29 15:37:11 +00:00
.TP
\fB \- \- quiet\fR
2004-02-20 15:49:29 +00:00
Be quiet (only print error messages).
2003-07-29 15:37:11 +00:00
.TP
\fB \- \- stdout\fR
2005-01-26 16:50:10 +00:00
Write all messages (except for libclamav output) to the standard output (stdout).
2003-07-29 15:37:11 +00:00
.TP
\fB \- d FILE/DIR, \- \- database=FILE/DIR\fR
2004-02-20 15:49:29 +00:00
Load virus database from FILE or load all virus database files from DIR.
2003-07-29 15:37:11 +00:00
.TP
2009-11-10 19:30:33 +01:00
\fB \- \- official\- db\- only=[yes/no(*)]\fR
Only load the official signatures published by the ClamAV project.
.TP
2003-07-29 15:37:11 +00:00
\fB \- l FILE, \- \- log=FILE\fR
2004-02-20 15:49:29 +00:00
Save scan report to FILE.
2003-07-29 15:37:11 +00:00
.TP
\fB \- \- tempdir=DIRECTORY\fR
2007-03-21 02:12:51 +00:00
Create temporary files in DIRECTORY. Directory must be writable for the '@CLAMAVUSER@' user or unprivileged user running clamscan.
2003-07-29 15:37:11 +00:00
.TP
2004-07-05 23:50:55 +00:00
\fB \- \- leave\- temps\fR
Do not remove temporary files.
.TP
2009-05-21 13:43:05 +00:00
\fB \- f FILE, \- \- file\- list=FILE\fR
Scan files listed line by line in FILE.
.TP
2003-07-29 15:37:11 +00:00
\fB \- r, \- \- recursive\fR
2004-02-20 15:49:29 +00:00
Scan directories recursively. All the subdirectories in the given directory will be scanned.
2003-07-29 15:37:11 +00:00
.TP
2009-08-05 16:27:48 +02:00
\fB \- \- cross\- fs=[yes(*)/no]\fR
Scan files and directories on other filesystems.
.TP
2004-01-14 03:47:16 +00:00
\fB \- \- bell\fR
Sound bell on virus detection.
.TP
\fB \- \- no\- summary\fR
2004-10-01 00:31:18 +00:00
Do not display summary at the end of scanning.
2003-07-29 15:37:11 +00:00
.TP
2009-12-04 14:20:12 +01:00
\fB \- \- exclude=REGEX, \- \- exclude\- dir=REGEX\fR
Don't scan file/directory names matching regular expression. These options can be used multiple times.
2003-07-29 15:37:11 +00:00
.TP
2009-12-04 14:20:12 +01:00
\fB \- \- include=REGEX, \- \- include\- dir=REGEX\fR
Only scan file/directory matching regular expression. These options can be used multiple times.
2004-12-27 00:07:46 +00:00
.TP
2003-07-29 15:37:11 +00:00
\fB \- i, \- \- infected\fR
2003-11-11 22:10:27 +00:00
Only print infected files.
2003-07-29 15:37:11 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- remove[=yes/no(*)]\fR
2003-07-29 15:37:11 +00:00
Remove infected files. \fB Be careful.\fR
2003-11-11 22:10:27 +00:00
.TP
2003-07-29 15:37:11 +00:00
\fB \- \- move=DIRECTORY\fR
2007-03-21 02:12:51 +00:00
Move infected files into DIRECTORY. Directory must be writable for the '@CLAMAVUSER@' user or unprivileged user running clamscan.
2003-07-29 15:37:11 +00:00
.TP
2007-02-12 18:38:32 +00:00
\fB \- \- copy=DIRECTORY\fR
2007-03-21 02:12:51 +00:00
Copy infected files into DIRECTORY. Directory must be writable for the '@CLAMAVUSER@' user or unprivileged user running clamscan.
2007-02-12 18:38:32 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- detect\- pua[=yes/no(*)]\fR
2007-08-13 18:10:35 +00:00
Detect Possibly Unwanted Applications.
.TP
2008-08-01 19:01:22 +00:00
\fB \- \- exclude\- pua=CATEGORY\fR
2008-09-02 12:54:18 +00:00
Exclude a specific PUA category. This option can be used multiple times. See http://www.clamav.net/support/pua for the complete list of PUA
2008-08-01 19:01:22 +00:00
.TP
\fB \- \- include\- pua=CATEGORY\fR
2008-09-02 12:54:18 +00:00
Only include a specific PUA category. This option can be used multiple times. See http://www.clamav.net/support/pua for the complete list of PUA
2008-08-01 19:01:22 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- detect\- structured[=yes/no(*)]\fR
Use the DLP (Data Loss Prevention) module to detect SSN and Credit Card numbers inside documents/text files.
2008-05-07 10:51:23 +00:00
.TP
\fB \- \- structured\- ssn\- format=X\fR
2008-08-29 23:33:12 +00:00
X=0: search for valid SSNs formatted as xxx-yy-zzzz (normal); X=1: search for valid SSNs formatted as xxxyyzzzz (stripped); X=2: search for both formats. Default is 0.
2008-05-07 10:51:23 +00:00
.TP
\fB \- \- structured\- ssn\- count=#n\fR
2008-08-29 10:32:33 +00:00
This option sets the lowest number of Social Security Numbers found in a file to generate a detect (default: 3).
2008-05-07 10:51:23 +00:00
.TP
\fB \- \- structured\- cc\- count=#n\fR
2008-08-29 10:32:33 +00:00
This option sets the lowest number of Credit Card numbers found in a file to generate a detect (default: 3).
2008-05-07 10:51:23 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- scan\- mail[=yes(*)/no]\fR
Scan mail files.
2004-08-18 15:22:48 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- phishing\- sigs[=yes(*)/no]\fR
Use the signature-based phishing detection.
2005-11-13 23:38:41 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- phishing\- scan\- urls[=yes(*)/no]\fR
Use the url-based heuristic phishing detection (Phishing.Heuristics.Email.*)
2006-09-14 19:38:17 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- heuristic\- scan\- precedence[=yes/no(*)]\fR
2008-07-31 10:51:46 +00:00
Allow heuristic match to take precedence. When enabled, if a heuristic scan (such as phishingScan) detects a possible virus/phish it will stop scan immediately. Recommended, saves CPU scan-time. When disabled, virus/phish detected by heuristic scans will be reported only at the end of a scan. If an archive contains both a heuristically detected virus/phish, and a real malware, the real malware will be reported Keep this disabled if you intend to handle "*.Heuristics.*" viruses differently from "real" malware. If a non-heuristically-detected virus (signature-based) is found first, the scan is interrupted immediately, regardless of this config option.
2006-09-14 19:38:17 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- phishing\- ssl[=yes/no(*)]\fR
Block SSL mismatches in URLs (might lead to false positives!).
2007-01-12 17:29:09 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- phishing\- cloak[=yes/no(*)]\fR
Block cloaked URLs (might lead to some false positives).
2007-01-12 17:29:09 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- algorithmic\- detection[=yes(*)/no]\fR
In some cases (eg. complex malware, exploits in graphic files, and others), ClamAV uses special algorithms to provide accurate detection. This option can be used to control the algorithmic detection.
2005-12-12 18:44:37 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- scan\- pe[=yes(*)/no]\fR
PE stands for Portable Executable \- it's an executable file format used in all 32\- bit versions of Windows operating systems. By default ClamAV performs deeper analysis of executable files and attempts to decompress popular executable packers such as UPX, Petite, and FSG.
2003-07-29 15:37:11 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- scan\- elf[=yes(*)/no]\fR
Executable and Linking Format is a standard format for UN*X executables. This option controls the ELF support.
2006-10-28 22:01:51 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- scan\- ole2[=yes(*)/no]\fR
Scan Microsoft Office documents and .msi files.
2004-03-14 20:45:58 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- scan\- pdf[=yes(*)/no]\fR
Scan within PDF files.
2007-02-22 17:49:57 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- scan\- html[=yes(*)/no]\fR
Detect, normalize/decrypt and scan HTML files and embedded scripts.
2004-07-02 23:00:58 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- scan\- archive[=yes(*)/no]\fR
Scan archives supported by libclamav.
2003-07-29 15:37:11 +00:00
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- detect\- broken[=yes/no(*)]\fR
2004-08-04 20:11:18 +00:00
Mark broken executables as viruses (Broken.Executable).
.TP
2008-12-30 10:33:43 +00:00
\fB \- \- block\- encrypted[=yes/no(*)]\fR
2004-03-14 20:45:58 +00:00
Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
.TP
2003-07-29 15:37:11 +00:00
\fB \- \- max\- files=#n\fR
2008-02-15 12:16:11 +00:00
Extract at most #n files from each scanned file (when this is an archive, a document or another kind of container). This option protects your system against DoS attacks (default: 10000)
2003-07-29 15:37:11 +00:00
.TP
2008-02-15 12:16:11 +00:00
\fB \- \- max\- filesize=#n\fR
2009-04-03 11:09:00 +00:00
Extract and scan at most #n kilobytes from each archive. You may pass the value in megabytes in format xM or xm, where x is a number. This option protects your system against DoS attacks (default: 25 MB, max: <4 GB)
2003-07-29 15:37:11 +00:00
.TP
2008-02-15 12:16:11 +00:00
\fB \- \- max\- scansize=#n\fR
2009-04-03 11:09:00 +00:00
Extract and scan at most #n kilobytes from each scanned file. You may pass the value in megabytes in format xM or xm, where x is a number. This option protects your system against DoS attacks (default: 100 MB, max: <4 GB)
2003-07-29 15:37:11 +00:00
.TP
2008-02-15 12:16:11 +00:00
\fB \- \- max\- recursion=#n\fR
Set archive recursion level limit. This option protects your system against DoS attacks (default: 16).
2004-04-20 22:33:42 +00:00
.TP
2005-06-18 23:00:56 +00:00
\fB \- \- max\- dir\- recursion=#n\fR
2005-03-25 22:27:48 +00:00
Maximum depth directories are scanned at (default: 15).
2003-07-29 15:37:11 +00:00
.SH "EXAMPLES"
.LP
.TP
2007-02-12 18:38:32 +00:00
(0) Scan a single file:
2003-07-29 15:37:11 +00:00
\fB clamscan file\fR
.TP
2007-02-12 18:38:32 +00:00
(1) Scan a current working directory:
2003-07-29 15:37:11 +00:00
\fB clamscan\fR
.TP
2003-11-11 22:10:27 +00:00
(2) Scan all files (and subdirectories) in /home:
2003-07-29 15:37:11 +00:00
\fB clamscan \- r /home\fR
.TP
2008-10-14 21:26:38 +00:00
(3) Load database from a file:
2003-07-29 15:37:11 +00:00
2008-10-14 21:26:38 +00:00
\fB clamscan \- d /tmp/newclamdb \- r /tmp\fR
2003-07-29 15:37:11 +00:00
.TP
2007-02-12 18:38:32 +00:00
(4) Scan a data stream:
2003-07-29 15:37:11 +00:00
\fB cat testfile | clamscan \- \fR
.TP
2007-02-12 18:38:32 +00:00
(5) Scan a mail spool directory:
2003-07-29 15:37:11 +00:00
2004-09-27 02:04:08 +00:00
\fB clamscan \- r /var/spool/mail\fR
2003-07-29 15:37:11 +00:00
.SH "RETURN CODES"
.LP
0 : No virus found.
.TP
1 : Virus(es) found.
.TP
2010-02-04 21:33:03 +01:00
2 : Some error(s) occured.
2003-07-29 15:37:11 +00:00
.SH "CREDITS"
Please check the full documentation for credits.
.SH "AUTHOR"
.LP
2003-11-11 22:10:27 +00:00
Tomasz Kojm <tkojm@clamav.net>
2003-07-29 15:37:11 +00:00
.SH "SEE ALSO"
.LP
2004-02-20 15:49:29 +00:00
clamdscan(1), freshclam(1)