2021-10-09 23:00:25 +01:00
|
|
|
# clamdscan
|
|
|
|
|
|
|
|
> A command-line virus scanner using the ClamAV Daemon.
|
2023-05-24 13:18:24 +01:00
|
|
|
> More information: <https://docs.clamav.net/manual/Usage/Scanning.html#clamdscan>.
|
2021-10-09 23:00:25 +01:00
|
|
|
|
|
|
|
- Scan a file or directory for vulnerabilities:
|
|
|
|
|
|
|
|
`clamdscan {{path/to/file_or_directory}}`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Scan data from `stdin`:
|
2021-10-09 23:00:25 +01:00
|
|
|
|
|
|
|
`{{command}} | clamdscan -`
|
|
|
|
|
|
|
|
- Scan the current directory and output only infected files:
|
|
|
|
|
|
|
|
`clamdscan --infected`
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
- Print the scan report to a log file:
|
2021-10-09 23:00:25 +01:00
|
|
|
|
|
|
|
`clamdscan --log {{path/to/log_file}}`
|
|
|
|
|
|
|
|
- Move infected files to a specific directory:
|
|
|
|
|
|
|
|
`clamdscan --move {{path/to/quarantine_directory}}`
|
|
|
|
|
|
|
|
- Remove infected files:
|
|
|
|
|
|
|
|
`clamdscan --remove`
|
|
|
|
|
|
|
|
- Use multiple threads to scan a directory:
|
|
|
|
|
|
|
|
`clamdscan --multiscan`
|
|
|
|
|
|
|
|
- Pass the file descriptor instead of streaming the file to the daemon:
|
|
|
|
|
|
|
|
`clamdscan --fdpass`
|