468b9e48 |
.\" Manual page created by Tomasz Kojm, 14/15 IV 2002 |
5aad82e2 |
.TH "clamscan" "1" "March 14, 2004" "Tomasz Kojm" "Clam AntiVirus" |
468b9e48 |
.SH "NAME"
.LP |
a0faaedf |
clamscan \- scan files and directories against viruses |
468b9e48 |
.SH "SYNOPSIS"
.LP
clamscan [options] [file/directory/\-]
.SH "DESCRIPTION"
.LP |
521b19b4 |
clamscan is a command line anti\-virus scanner. It's a part of the Clam AntiVirus package. |
468b9e48 |
.SH "OPTIONS"
.LP
.TP
\fB\-h, \-\-help\fR |
521b19b4 |
Print help information and exit. |
468b9e48 |
.TP
\fB\-V, \-\-version\fR |
521b19b4 |
Print version number and exit. |
468b9e48 |
.TP
\fB\-v, \-\-verbose\fR |
a0faaedf |
Be verbose.
.TP
\fB\-\-debug\fR |
521b19b4 |
Enable debug messages (from libclamav). |
468b9e48 |
.TP
\fB\-\-quiet\fR |
521b19b4 |
Be quiet (only print error messages). |
468b9e48 |
.TP
\fB\-\-stdout\fR |
521b19b4 |
Write all messages to the standard output (stdout) instead of the standard error output (stderr). |
468b9e48 |
.TP
\fB\-d FILE/DIR, \-\-database=FILE/DIR\fR |
521b19b4 |
Load virus database from FILE or load all virus database files from DIR. |
468b9e48 |
.TP
\fB\-l FILE, \-\-log=FILE\fR |
521b19b4 |
Save scan report to FILE. |
468b9e48 |
.TP
\fB\-\-tempdir=DIRECTORY\fR
Create temporary files in DIRECTORY. Directory must be writeable for the 'clamav' user or unprivileged user running clamscan.
.TP
\fB\-r, \-\-recursive\fR |
521b19b4 |
Scan directories recursively. All the subdirectories in the given directory will be scanned. |
468b9e48 |
.TP |
ead674a2 |
\fB\-\-bell\fR
Sound bell on virus detection.
.TP
\fB\-\-no\-summary\fR
Disable summary printing at the end of scanning. |
468b9e48 |
.TP
\fB\-\-exclude=PATT\fR
Don't scan file names containing PATT. It may be used multiple times.
.TP
\fB\-\-include=PATT\fR
Only scan file names containing PATT. It may be used multiple times.
.TP
\fB\-\-mbox\fR |
521b19b4 |
Enable scanning of various mail file types (also treat stdin as a mailbox \- for backward compatibility). |
a0faaedf |
.TP |
468b9e48 |
\fB\-i, \-\-infected\fR |
a0faaedf |
Only print infected files. |
468b9e48 |
.TP
\fB\-\-remove\fR
Remove infected files. \fBBe careful.\fR |
a0faaedf |
.TP |
468b9e48 |
\fB\-\-move=DIRECTORY\fR
Move infected files into DIRECTORY. Directory must be writeable for the 'clamav' user or unprivileged user running clamscan.
.TP
EXTRACTION OPTIONS:
.TP |
5aad82e2 |
\fB\-\-no\-ole2\fR
Disable support for Microsoft Office document files.
.TP |
ead674a2 |
\fB\-\-no\-archive\fR |
468b9e48 |
Disable archive support built in libclamav.
.TP |
8373a9b0 |
\fB\-\-block\-encrypted\fR |
5aad82e2 |
Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
.TP |
468b9e48 |
\fB\-\-max\-files=#n\fR |
521b19b4 |
Extract first #n files from each archive. This option protects your system against DoS attacks (default: 500) |
468b9e48 |
.TP
\fB\-\-max\-space=#n\fR |
521b19b4 |
Extract first #n kilobytes from each archive. You may give the number in megabytes in format xM or xm, where x is a number. This option protects your system against DoS attacks (default: 10 MB) |
468b9e48 |
.TP
\fB\-\-max\-recursion=#n\fR |
521b19b4 |
Set archive recursion level limit. This option protects your system against DoS attacks (default: 5). |
468b9e48 |
.TP |
a19f21b6 |
\fB\-\-max\-ratio=#n\fR
Set maximum archive compression ratio limit. This option protects your system against DoS attacks (default: 200).
.TP |
468b9e48 |
\fB\-\-unzip[=FULLPATH]\fR |
521b19b4 |
In most cases you don't need this option \- the built\-in unarchiver will do extract Zip archives. This option however may be used as a backup for internal unpacker \- see the full documentation for more information. When enabled without an argument, unzip program will be searched in $PATH. If unzip cannot be found in $PATH, you must force it with =pathname. Remember about '=' between the option and an argument. |
468b9e48 |
.TP
\fB\-\-unrar[=FULLPATH]\fR |
521b19b4 |
Scan .rar files. |
468b9e48 |
.TP
\fB\-\-unace[=FULLPATH]\fR |
521b19b4 |
Scan .ace files. |
468b9e48 |
.TP
\fB\-\-unarj[=FULLPATH]\fR |
521b19b4 |
Scan .arj files. |
468b9e48 |
.TP
\fB\-\-unzoo[=FULLPATH]\fR |
521b19b4 |
Scan .zoo files. |
468b9e48 |
.TP
\fB\-\-lha[=FULLPATH]\fR |
521b19b4 |
Scan .lzh files. |
468b9e48 |
.TP
\fB\-\-jar[=FULLPATH]\fR |
521b19b4 |
clamscan uses unzip for .jar files, so optionally eventually you will need to pass a full path to unzip. |
468b9e48 |
.TP
\fB\-\-deb[=FULLPATH]\fR
This option supports debian binary packages. Implies \-\-tgz, but doesn't conflict with \-\-tgz=FULLPATH. It requires ar utility.
.TP
\fB\-\-tar[=FULLPATH]\fR
This option supports non\-compressed archives.
.TP
\fB\-\-tgz[=FULLPATH]\fR |
521b19b4 |
This option supports tar.gz and .tgz files. You need GNU tar, on non\-Linux system you probably have it installed as gtar. If it's in $PATH, please use \-\-tgz=gtar in other case please pass a full path. |
468b9e48 |
.SH "EXAMPLES"
.LP
.TP |
521b19b4 |
(0) Scan selected file: |
468b9e48 |
\fBclamscan file\fR
.TP |
521b19b4 |
(1) Scan current working directory: |
468b9e48 |
\fBclamscan\fR
.TP |
a0faaedf |
(2) Scan all files (and subdirectories) in /home: |
468b9e48 |
\fBclamscan \-r /home\fR
.TP |
521b19b4 |
(3) Load database from selected file and limit disk usage to 50 Mb: |
468b9e48 |
|
a0faaedf |
\fBclamscan \-d /tmp/newclamdb \-\-max\-space=50m \-r /tmp\fR |
468b9e48 |
.TP |
521b19b4 |
(4) Scan data stream: |
468b9e48 |
\fBcat testfile | clamscan \-\fR
.TP |
521b19b4 |
(5) Scan mail spool directory: |
468b9e48 |
\fBclamscan \-r \-\-mbox /var/spool/mail\fR
.SH "RETURN CODES"
.LP |
521b19b4 |
Note: some return codes may only appear in a one file mode (clamscan is started with file argument). Those are marked with \fB(ofm)\fR. |
468b9e48 |
0 : No virus found.
.TP
1 : Virus(es) found.
.TP
40: Unknown option passed.
.TP |
a0faaedf |
50: Database initialization error. |
468b9e48 |
.TP
52: Not supported file type.
.TP
53: Can't open directory.
.TP
54: Can't open file. (ofm)
.TP
55: Error reading file. (ofm)
.TP
56: Can't stat input file / directory.
.TP |
521b19b4 |
57: Can't get absolute path name of current working directory. |
468b9e48 |
.TP |
521b19b4 |
58: I/O error, please check your filesystem. |
468b9e48 |
.TP
59: Can't get information about current user from /etc/passwd.
.TP
60: Can't get information about user 'clamav' (default name) from /etc/passwd.
.TP
61: Can't fork.
.TP
63: Can't create temporary files/directories (check permissions).
.TP |
521b19b4 |
64: Can't write to temporary directory (please specify another one). |
468b9e48 |
.TP
70: Can't allocate and clear memory (calloc).
.TP
71: Can't allocate memory (malloc).
.SH "CREDITS"
Please check the full documentation for credits.
.SH "AUTHOR"
.LP |
a0faaedf |
Tomasz Kojm <tkojm@clamav.net> |
468b9e48 |
.SH "SEE ALSO"
.LP |
521b19b4 |
clamdscan(1), freshclam(1) |