$ echo $?Here is a list of return codes from clamscan:
0: No virus was found.
1: Virus(es) detected.
40: Unknown option was passed to clamscan. Please check
clamscan -help or manual page for available options.
50: Problem with initialization of virus database. Probably
it doesn't exist in the default place or wrong file was passed
to -database.
51: Wrong number of threads was passed to -threads. It
must be a natural number .
52: Not supported file type. Scanner supports regular files,
directories and symlinks.
53: Can't open directory.
54: Can't open file.
55: Error reading file. Probably the medium you are reading is broken.
5
56: Can't stat input file or directory. File / directory you want to
scan doesn't exist.
57: Can't get absolute pathname of current working directory. Your
current pathname is longer then 200 characters. When clamscan
is started without a input file / directory it scans the current
directory. For some reasons it needs absolute pathnames, the buffer
is hardcoded to 200 characters and that should be sufficient.
58: I/O error. Please check the filesystem.
59: Can't get information about current user (running clamscan).
60: Can't get information about user clamav. User clamav
(default unprivileged user) doesn't exist in /etc/passwd.
61: Can't fork. Can't create new process, please check your limits.
63: Can't create temporary file or directory. Please check permissions.
64: Can't write to temporary directory. Please specify another one.
70: Can't allocate and clear memory. This is a critical error, please
check your system.
71: Can't allocate memory. Look above.