1Clamd client(1) Clam AntiVirus Clamd client(1)
2
3
4
6 clamdscan - scan files and directories for viruses using Clam AntiVirus
7 Daemon
8
10 clamdscan [options] [file/directory]
11
13 clamdscan is a clamd client which may be used as a clamscan replace‐
14 ment. It accepts all the options implemented in clamscan but most of
15 them will be ignored because its scanning abilities only depend on
16 clamd.
17
19 -h, --help
20 Display help information and exit.
21
22 -V, --version
23 Print version number and exit.
24
25 -v, --verbose
26 Be verbose.
27
28 --quiet
29 Be quiet - only output error messages.
30
31 --stdout
32 Write all messages (except for libclamav output) to the standard
33 output (stdout).
34
35 --config-file=FILE
36 Read clamd settings from FILE.
37
38 -l FILE, --log=FILE
39 Save the scan report to FILE.
40
41 -f FILE, --file-list=FILE
42 Scan files listed line by line in FILE.
43
44 -p A[:I], --ping A[:I]
45 Ping clamd up to [A] times at optional interval [I] until it re‐
46 sponds.
47
48 -w, --wait
49 Wait up to 30 seconds for clamd to start. Optionally use along‐
50 side ping to set attempts [A] and interval [I] to check clamd.
51
52 -m, --multiscan
53 In the multiscan mode clamd will attempt to scan the directory
54 contents in parallel using available threads. This option is es‐
55 pecially useful on multiprocessor and multi-core systems. If you
56 pass more than one file or directory in the command line, they
57 are put in a queue and sent to clamd individually. This means,
58 that single files are always scanned by a single thread. Simi‐
59 larly, clamdscan will wait for clamd to finish a directory scan
60 (performed in multiscan mode) before sending request to scan an‐
61 other directory. This option can be combined with --fdpass (see
62 below).
63
64 -z, --allmatch
65 After a match, continue scanning within the file for additional
66 matches.
67
68 --remove
69 Remove infected files. Be careful.
70
71 --move=DIRECTORY
72 Move infected files into DIRECTORY.
73
74 --copy=DIRECTORY
75 Copy infected files into DIRECTORY.
76
77 --no-summary
78 Do not display summary at the end of scanning.
79
80 --reload
81 Request clamd to reload virus database.
82
83 --allmatch
84 Continue scanning within file after finding a match.
85
86 --fdpass
87 Pass the file descriptor permissions to clamd. This is useful if
88 clamd is running as a different user as it is faster than
89 streaming the file to clamd. Only available if connected to
90 clamd via local(unix) socket.
91
92 --stream
93 Forces file streaming to clamd. This is generally not needed as
94 clamdscan detects automatically if streaming is required. This
95 option only exists for debugging and testing purposes, in all
96 other cases --fdpass is preferred.
97
99 (0) To scan a one file:
100
101 clamdscan file
102
103 (1) To scan a current working directory:
104
105 clamdscan
106
107 (2) To scan all files in /home:
108
109 clamdscan /home
110
111 (3) To scan a file when clamd is running as a different user:
112
113 clamdscan --fdpass ~/downloads
114
115 (4) To scan from standard input:
116
117 clamdscan - < file_to_scan
118
119 cat file_to_scan | clamdscan -
120
122 0 : No virus found.
123
124 1 : Virus(es) found.
125
126 2 : An error occurred.
127
129 Please check the full documentation for credits.
130
132 Tomasz Kojm <tkojm@clamav.net>
133
135 clamd(8), clamd.conf(5), clamscan(1)
136
137
138
139ClamAV 0.103.7 February 12, 2009 Clamd client(1)