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 -i, --infected
87 Only print infected files
88
89 --fdpass
90 Pass the file descriptor permissions to clamd. This is useful if
91 clamd is running as a different user as it is faster than
92 streaming the file to clamd. Only available if connected to
93 clamd via local(unix) socket.
94
95 --stream
96 Forces file streaming to clamd. This is generally not needed as
97 clamdscan detects automatically if streaming is required. This
98 option only exists for debugging and testing purposes, in all
99 other cases --fdpass is preferred.
100
101
103 (0) To scan a one file:
104
105 clamdscan file
106
107 (1) To scan a current working directory:
108
109 clamdscan
110
111 (2) To scan all files in /home:
112
113 clamdscan /home
114
115 (3) To scan a file when clamd is running as a different user:
116
117 clamdscan --fdpass ~/downloads
118
119 (4) To scan from standard input:
120
121 clamdscan - < file_to_scan
122
123 cat file_to_scan | clamdscan -
124
126 0 : No virus found.
127
128 1 : Virus(es) found.
129
130 2 : An error occurred.
131
133 Please check the full documentation for credits.
134
136 Tomasz Kojm <tkojm@clamav.net>
137
139 clamd(8), clamd.conf(5), clamscan(1)
140
141
142
143ClamAV 1.0.4 February 12, 2009 Clamd client(1)