1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-06 21:55:24 +02:00
tldr/pages/common/clamscan.md

37 lines
804 B
Markdown
Raw Normal View History

2019-03-05 00:11:21 +00:00
# clamscan
> A virus scanner.
> 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|--recursive]}} {{path/to/directory}}`
2019-03-05 00:11:21 +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 {{[-d|--database]}} {{path/to/database_file_or_directory}}`
2019-03-05 00:11:21 +00:00
- Scan the current directory and output only infected files:
`clamscan {{[-i|--infected]}}`
2019-03-05 00:11:21 +00:00
- Print the scan report to a log file:
2019-03-05 00:11:21 +00:00
`clamscan {{[-l|--log]}} {{path/to/log_file}}`
2019-03-05 00:11:21 +00:00
- Move infected files to a specific directory:
`clamscan --move {{path/to/quarantine_directory}}`
- Remove infected files:
`clamscan --remove yes`