docs/man/clamdscan.1.in
f17400cf
 .TH "Clamd client" "1" "February 12, 2009" "ClamAV @VERSION@" "Clam AntiVirus"
28e73e95
 .SH "NAME"
9e20cdf6
 .LP
f3a638e4
 clamdscan \- scan files and directories for viruses using Clam AntiVirus Daemon
28e73e95
 .SH "SYNOPSIS"
9e20cdf6
 .LP
a9ebff44
 clamdscan [options] [file/directory]
28e73e95
 .SH "DESCRIPTION"
9e20cdf6
 .LP
f17400cf
 clamdscan is a clamd client which may be used as a clamscan replacement. It accepts all the options implemented in clamscan but most of them will be ignored because its scanning abilities only depend on clamd.
28e73e95
 .SH "OPTIONS"
9e20cdf6
 .LP
28e73e95
 
9e20cdf6
 .TP
28e73e95
 \fB\-h, \-\-help\fR
f3a638e4
 Display help information and exit.
9e20cdf6
 .TP
28e73e95
 \fB\-V, \-\-version\fR
5def21ff
 Print version number and exit.
9e20cdf6
 .TP
28e73e95
 \fB\-v, \-\-verbose\fR
f3a638e4
 Be verbose.
9e20cdf6
 .TP
28e73e95
 \fB\-\-quiet\fR
 Be quiet \- only output error messages.
9e20cdf6
 .TP
28e73e95
 \fB\-\-stdout\fR
8589f1a0
 Write all messages (except for libclamav output) to the standard output (stdout).
9e20cdf6
 .TP
a9ebff44
 \fB\-\-config\-file=FILE\fR
 Read clamd settings from FILE.
9e20cdf6
 .TP
28e73e95
 \fB\-l FILE, \-\-log=FILE\fR
5def21ff
 Save the scan report to FILE.
9e20cdf6
 .TP
c2b6681b
 \fB\-f FILE, \-\-file\-list=FILE\fR
 Scan files listed line by line in FILE.
9e20cdf6
 .TP
 \fB\-p A[:I], \-\-ping A[:I]\fR
9e08216c
 Ping clamd up to [A] times at optional interval [I] until it responds.
 .TP
 \fB\-w, \-\-wait\fR
854d38de
 Wait up to 30 seconds for clamd to start. Optionally use alongside ping to set attempts [A] and interval [I] to check clamd.
9e20cdf6
 .TP
3bb3357a
 \fB\-m, \-\-multiscan\fR
3295bc7a
 In the multiscan mode clamd will attempt to scan the directory contents in parallel using available threads. This option is especially useful on multiprocessor and multi-core systems. If you pass more than one file or directory in the command line, they are put in a queue and sent to clamd individually. This means, that single files are always scanned by a single thread. Similarly, clamdscan will wait for clamd to finish a directory scan (performed in multiscan mode) before sending request to scan another directory. This option can be combined with \-\-fdpass (see below).
1feaa72a
 .TP
 \fB\-z, \-\-allmatch\fR
 After a match, continue scanning within the file for additional matches.
9e20cdf6
 .TP
63abd169
 \fB\-\-remove\fR
 Remove infected files. \fBBe careful.\fR
9e20cdf6
 .TP
63abd169
 \fB\-\-move=DIRECTORY\fR
 Move infected files into DIRECTORY.
9e20cdf6
 .TP
 \fB\-\-copy=DIRECTORY\fR
 Copy infected files into DIRECTORY.
 .TP
02b4b0c7
 \fB\-\-no\-summary\fR
 Do not display summary at the end of scanning.
c1a133a0
 .TP
c1c9d9f9
 \fB\-\-reload\fR
 Request clamd to reload virus database.
 .TP
9e20cdf6
 \fB\-\-allmatch\fR
 Continue scanning within file after finding a match.
 .TP
c1a133a0
 \fB\-\-fdpass\fR
f17400cf
 Pass the file descriptor permissions to clamd. This is useful if clamd is running as a different user as it is faster than streaming the file to clamd.
 Only available if connected to clamd via local(unix) socket.
408be01f
 .TP
 \fB\-\-stream\fR
 Forces file streaming to clamd. This is generally not needed as clamdscan detects automatically if streaming is required. This option only exists for debugging and testing purposes, in all other cases \-\-fdpass is preferred.
28e73e95
 .SH "EXAMPLES"
9e20cdf6
 .LP
 .TP
28e73e95
 (0) To scan a one file:
 
 \fBclamdscan file\fR
9e20cdf6
 .TP
5def21ff
 (1) To scan a current working directory:
28e73e95
 
 \fBclamdscan\fR
9e20cdf6
 .TP
28e73e95
 (2) To scan all files in /home:
 
 \fBclamdscan /home\fR
c1a133a0
 .TP
 (3) To scan a file when clamd is running as a different user:
 
394a3b00
 \fBclamdscan \-\-fdpass ~/downloads\fR
f17400cf
 .TP
 (4) To scan from standard input:
 
2456a2bf
 \fBclamdscan \- < file_to_scan\fR
 
8442a56d
 \fBcat file_to_scan | clamdscan \-\fR
28e73e95
 .SH "RETURN CODES"
9e20cdf6
 .LP
28e73e95
 0 : No virus found.
9e20cdf6
 .TP
28e73e95
 1 : Virus(es) found.
9e20cdf6
 .TP
166174bc
 2 : An error occurred.
28e73e95
 .SH "CREDITS"
 Please check the full documentation for credits.
 .SH "AUTHOR"
9e20cdf6
 .LP
5def21ff
 Tomasz Kojm <tkojm@clamav.net>
28e73e95
 .SH "SEE ALSO"
9e20cdf6
 .LP
021b6720
 clamd(8), clamd.conf(5), clamscan(1)