Run virus scan

The text of the command to start a virus scan of a specific area has the following general format:

kav scan <scan scope> <action> <file types> <exclusions> <report parameters> <advanced parameters>

Note: To run a virus scan, you can also use tasks created in the application by starting one from the command line. The task is started with the parameters that are specified in the Kaspersky Internet Security interface.

Parameter descriptions

<scan scope> – This parameter specifies a list of objects that are to be scanned for malicious code. The parameter may include several values (separated by a space) from the following list:

<action> – This parameter determines the action to take on malicious objects that are detected during the scan. If this parameter is not defined, the default action is the one corresponding to the value -i8. The following values are possible:

<file types> – This parameter defines the file types that are subject to virus scan. By default, if this parameter is not defined, only infectable files (based on the file contents) are scanned. The following values are possible:

<exclusions> – This parameter defines the objects to exclude from scanning. You can include several parameters from the list below, separating them with a space:

<report parameters> – These parameters define the format of the report containing the scan results. You can use an absolute or relative path to the file for saving the report. If this parameter is not defined, scan results are displayed and all events are shown.

<advanced parameters> – Parameters that define the use of virus scan technologies and configuration files:

Example:

Start scan of the folders ~/Documents, /Applications, and the file named my test.exe:

kav scan ~/Documents /Applications 'my test.exe'

Scan the objects listed in the file object2scan.txt. Use the scan_settings.txt configuration file. When the scan is complete, create a report to log all events:

kav scan -@:objects2scan.txt -c:scan_settings.txt -ra:scan.log

A sample configuration file:

-netdrives -@:objects2scan.txt -ra:scan.log

Page top