1
.TH "clamscan" "1" "December 30, 2008" "ClamAV @VERSION@" "Clam AntiVirus"
4
clamscan \- scan files and directories for viruses
7
clamscan [options] [file/directory/\-]
10
clamscan is a command line anti\-virus scanner.
13
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.
16
Print help information and exit.
18
\fB\-V, \-\-version\fR
19
Print version number and exit.
21
\fB\-v, \-\-verbose\fR
25
Display debug messages from libclamav.
28
Be quiet (only print error messages).
31
Write all messages (except for libclamav output) to the standard output (stdout).
33
\fB\-d FILE/DIR, \-\-database=FILE/DIR\fR
34
Load virus database from FILE or load all virus database files from DIR.
36
\fB\-\-official\-db\-only=[yes/no(*)]\fR
37
Only load the official signatures published by the ClamAV project.
39
\fB\-l FILE, \-\-log=FILE\fR
40
Save scan report to FILE.
42
\fB\-\-tempdir=DIRECTORY\fR
43
Create temporary files in DIRECTORY. Directory must be writable for the '@CLAMAVUSER@' user or unprivileged user running clamscan.
45
\fB\-\-leave\-temps\fR
46
Do not remove temporary files.
48
\fB\-f FILE, \-\-file\-list=FILE\fR
49
Scan files listed line by line in FILE.
51
\fB\-r, \-\-recursive\fR
52
Scan directories recursively. All the subdirectories in the given directory will be scanned.
54
\fB\-\-cross\-fs=[yes(*)/no]\fR
55
Scan files and directories on other filesystems.
57
\fB\-\-follow\-dir\-symlinks=[0/1(*)/2]\fR
58
Follow directory symlinks. There are 3 options: 0 - never follow directory symlinks, 1 (default) - only follow directory symlinks, which are passed as direct arguments to clamscan. 2 - never follow directory symlinks.
60
\fB\-\-follow\-file\-symlinks=[0/1(*)/2]\fR
61
Follow file symlinks. There are 3 options: 0 - never follow file symlinks, 1 (default) - only follow file symlinks, which are passed as direct arguments to clamscan. 2 - never follow file symlinks.
64
Sound bell on virus detection.
67
Do not display summary at the end of scanning.
69
\fB\-\-exclude=REGEX, \-\-exclude\-dir=REGEX\fR
70
Don't scan file/directory names matching regular expression. These options can be used multiple times.
72
\fB\-\-include=REGEX, \-\-include\-dir=REGEX\fR
73
Only scan file/directory matching regular expression. These options can be used multiple times.
75
\fB\-i, \-\-infected\fR
76
Only print infected files.
78
\fB\-\-remove[=yes/no(*)]\fR
79
Remove infected files. \fBBe careful.\fR
81
\fB\-\-move=DIRECTORY\fR
82
Move infected files into DIRECTORY. Directory must be writable for the '@CLAMAVUSER@' user or unprivileged user running clamscan.
84
\fB\-\-copy=DIRECTORY\fR
85
Copy infected files into DIRECTORY. Directory must be writable for the '@CLAMAVUSER@' user or unprivileged user running clamscan.
87
\fB\-\-bytecode[=yes(*)/no]\fR
88
With this option enabled ClamAV will load bytecode from the database. It is highly recommended you keep this option turned on, otherwise you may miss detections for many new viruses.
90
\fB\-\-bytecode\-trust\-all[=yes/no(*)]\fR
91
This option disables safety checks and makes ClamAV trust all bytecode. It should only be used for debugging.
93
\fB\-\-bytecode\-timeout=N\fR
94
Set bytecode timeout in milliseconds (default: 60000 = 60s)
96
\fB\-\-detect\-pua[=yes/no(*)]\fR
97
Detect Possibly Unwanted Applications.
99
\fB\-\-exclude\-pua=CATEGORY\fR
100
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
102
\fB\-\-include\-pua=CATEGORY\fR
103
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
105
\fB\-\-detect\-structured[=yes/no(*)]\fR
106
Use the DLP (Data Loss Prevention) module to detect SSN and Credit Card numbers inside documents/text files.
108
\fB\-\-structured\-ssn\-format=X\fR
109
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.
111
\fB\-\-structured\-ssn\-count=#n\fR
112
This option sets the lowest number of Social Security Numbers found in a file to generate a detect (default: 3).
114
\fB\-\-structured\-cc\-count=#n\fR
115
This option sets the lowest number of Credit Card numbers found in a file to generate a detect (default: 3).
117
\fB\-\-scan\-mail[=yes(*)/no]\fR
120
\fB\-\-phishing\-sigs[=yes(*)/no]\fR
121
Use the signature-based phishing detection.
123
\fB\-\-phishing\-scan\-urls[=yes(*)/no]\fR
124
Use the url-based heuristic phishing detection (Phishing.Heuristics.Email.*)
126
\fB\-\-heuristic\-scan\-precedence[=yes/no(*)]\fR
127
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.
129
\fB\-\-phishing\-ssl[=yes/no(*)]\fR
130
Block SSL mismatches in URLs (might lead to false positives!).
132
\fB\-\-phishing\-cloak[=yes/no(*)]\fR
133
Block cloaked URLs (might lead to some false positives).
135
\fB\-\-algorithmic\-detection[=yes(*)/no]\fR
136
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.
138
\fB\-\-scan\-pe[=yes(*)/no]\fR
139
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.
141
\fB\-\-scan\-elf[=yes(*)/no]\fR
142
Executable and Linking Format is a standard format for UN*X executables. This option controls the ELF support.
144
\fB\-\-scan\-ole2[=yes(*)/no]\fR
145
Scan Microsoft Office documents and .msi files.
147
\fB\-\-scan\-pdf[=yes(*)/no]\fR
148
Scan within PDF files.
150
\fB\-\-scan\-html[=yes(*)/no]\fR
151
Detect, normalize/decrypt and scan HTML files and embedded scripts.
153
\fB\-\-scan\-archive[=yes(*)/no]\fR
154
Scan archives supported by libclamav.
156
\fB\-\-detect\-broken[=yes/no(*)]\fR
157
Mark broken executables as viruses (Broken.Executable).
159
\fB\-\-block\-encrypted[=yes/no(*)]\fR
160
Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
162
\fB\-\-max\-files=#n\fR
163
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)
165
\fB\-\-max\-filesize=#n\fR
166
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)
168
\fB\-\-max\-scansize=#n\fR
169
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)
171
\fB\-\-max\-recursion=#n\fR
172
Set archive recursion level limit. This option protects your system against DoS attacks (default: 16).
174
\fB\-\-max\-dir\-recursion=#n\fR
175
Maximum depth directories are scanned at (default: 15).
179
(0) Scan a single file:
183
(1) Scan a current working directory:
187
(2) Scan all files (and subdirectories) in /home:
189
\fBclamscan \-r /home\fR
191
(3) Load database from a file:
193
\fBclamscan \-d /tmp/newclamdb \-r /tmp\fR
195
(4) Scan a data stream:
197
\fBcat testfile | clamscan \-\fR
199
(5) Scan a mail spool directory:
201
\fBclamscan \-r /var/spool/mail\fR
208
2 : Some error(s) occured.
210
Please check the full documentation for credits.
213
Tomasz Kojm <tkojm@clamav.net>
216
clamdscan(1), freshclam(1), freshclam.conf(5)