2025-03-14 21:59:59 -06:00
|
|
|
# clamscan
|
|
|
|
|
|
|
|
|
|
> A command-line virus scanner.
|
|
|
|
|
> More information: <https://docs.clamav.net/manual/Usage/Scanning.html#clamscan>.
|
|
|
|
|
|
|
|
|
|
- Scan a file for vulnerabilities:
|
|
|
|
|
|
|
|
|
|
`clamscan {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Scan all files recursively in a specific directory:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`clamscan {{[-r|--recursive]}} {{path/to/directory}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Scan data from `stdin`:
|
|
|
|
|
|
|
|
|
|
`{{command}} | clamscan -`
|
|
|
|
|
|
|
|
|
|
- Specify a virus database file or directory of files:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`clamscan {{[-d|--database]}} {{path/to/database_file_or_directory}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Scan the current directory and output only infected files:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`clamscan {{[-i|--infected]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Print the scan report to a log file:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`clamscan {{[-l|--log]}} {{path/to/log_file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Move infected files to a specific directory:
|
|
|
|
|
|
|
|
|
|
`clamscan --move {{path/to/quarantine_directory}}`
|
|
|
|
|
|
|
|
|
|
- Remove infected files:
|
|
|
|
|
|
|
|
|
|
`clamscan --remove yes`
|