Quick start
This walks you from a freshly-built binary to a working scan. You’ll need exav installed first.
-
Get ClamAV signatures with Cisco’s own updater, onto your own machine:
Terminal window pip install cvdupdatecvd update # or `freshclam`This populates
~/.cvdupdate/databasewithmain.cvd/daily.cvd/bytecode.cvd. See Signatures for the licensing background and third-party feeds. -
Scan a file, pointing
-dat that directory:Terminal window exav -d ~/.cvdupdate/database suspicious.binOutput is
clamscan-compatible:Terminal window suspicious.bin: Win.Trojan.Agent-1234 FOUNDor, for a clean file:
Terminal window suspicious.bin: OK -
Scan a directory — recursive by default, printing only errors and detections:
Terminal window exav -d ~/.cvdupdate/database --quiet /var/www -
Stream from stdin — constant memory, any size, no temp file:
Terminal window cat backup.tar.gz | exav -d ~/.cvdupdate/database -aws s3 cp s3://bucket/backup-50gb.tar.gz - | exav -d ~/.cvdupdate/database -
Understand the exit code
Section titled “Understand the exit code”Each code is a status word, and the status is the last word on the result line:
| Exit | Status | Meaning |
|---|---|---|
0 |
OK |
Clean — every file was fully scanned and nothing matched. |
1 |
FOUND |
At least one detection. |
2 |
ERROR |
exav could not do its job: an unreadable path, a database that would not load. |
3 |
PARTIAL |
exav worked, and something could not be fully examined — LIMITS-EXCEEDED, UNSCANNABLE or PASSWORD-PROTECTED. |
Faster startup: build a database once
Section titled “Faster startup: build a database once”Loading Cisco’s raw ClamAV database (main.cvd+daily.cvd) builds a large
in-memory automaton (tens
of seconds, several GB of transient RAM). Do that work once and reuse it:
exav -d ~/.cvdupdate/database --build-db exav.exavdb # heavy, run daily in CIexav -d exav.exavdb /data # ~sub-second cold startSee the prebuilt database guide.
Run it as a daemon
Section titled “Run it as a daemon”Load the database once and serve scans over a socket, so callers pay no per-scan cold-start cost:
exav --listen /run/user/1000/exav.sock -d exav.exavdb # load once, serveexav --connect /run/user/1000/exav.sock /data # client: no load costclamdscan --stream file.bin # the official ClamAV client works tooThe direction is the flag: --listen accepts connections, --connect makes
one. The protocol travels in the address, so --listen icap://0.0.0.0:1344
serves ICAP from the same binary — and naming both serves both from one process
over one loaded database.
See the daemon guide.
- Scanning — files, directories, output formats, exit codes.
- Migrating from ClamAV — replace
clamscan/clamdin place. - CLI reference — every flag.