$ clamscan; echo Return code: $?Here is the full list of return codes for clamscan:
0: No virus was found.
1: Virus(es) detected.
40: Unknown option passed to clamscan. Please check
clamscan -help or manual page for available options.
50: Virus database initialization error. Probably it doesn't exist
at the default location or it's malformed (e.g. broken digital
signature)
52: Not supported file type - clamscan only supports regular files,
directories and symlinks.
53: Can't open directory.
54: Can't open file.
55: I/O error during read.
7
56: Can't stat input file or directory. File (or 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. This is bad and
you may need to recompile ClamAV to fix it.
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 system limits.
63: Can't create temporary file or directory. Please check /tmp
permissions or use -tempdir
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.