2019-03-05 00:11:21 +00:00
|
|
|
# clamscan
|
|
|
|
|
2021-05-20 21:13:41 +01:00
|
|
|
> A command-line virus scanner.
|
2023-05-24 13:18:24 +01:00
|
|
|
> More information: <https://docs.clamav.net/manual/Usage/Scanning.html#clamscan>.
|
2019-03-05 00:11:21 +00:00
|
|
|
|
|
|
|
- Scan a file for vulnerabilities:
|
|
|
|
|
|
|
|
`clamscan {{path/to/file}}`
|
|
|
|
|
|
|
|
- Scan all files recursively in a specific directory:
|
|
|
|
|
|
|
|
`clamscan -r {{path/to/directory}}`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Scan data from `stdin`:
|
2019-03-05 00:11:21 +00:00
|
|
|
|
|
|
|
`{{command}} | clamscan -`
|
|
|
|
|
|
|
|
- Specify a virus database file or directory of files:
|
|
|
|
|
|
|
|
`clamscan --database {{path/to/database_file_or_directory}}`
|
|
|
|
|
|
|
|
- Scan the current directory and output only infected files:
|
|
|
|
|
|
|
|
`clamscan --infected`
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
- Print the scan report to a log file:
|
2019-03-05 00:11:21 +00:00
|
|
|
|
|
|
|
`clamscan --log {{path/to/log_file}}`
|
|
|
|
|
|
|
|
- Move infected files to a specific directory:
|
|
|
|
|
|
|
|
`clamscan --move {{path/to/quarantine_directory}}`
|
|
|
|
|
|
|
|
- Remove infected files:
|
|
|
|
|
|
|
|
`clamscan --remove yes`
|