Usage Examples |
Usage Examples for Dr.Web Ctl (drweb-ctl): 1)Start scanning of the /home directory with default parameters: $ drweb-ctl scan /home 2)Scan paths listed in the daily_scan file (one path per line, a vertical bar character (|): $ drweb-ctl scan --stdin < daily_scan 3)Scan listed paths separated with the NUL character: $ find -print0 | drweb-ctl scan --stdin0 4)Start scanning the boot record on the sda disk: $ drweb-ctl bootscan /dev/sda 5)Output all parameters from the [Root] section of the active configuration: $ drweb-ctl cfshow Root 6)Set 'No' as the Start parameter value in the [LinuxSpider] section (this parameter value disables SpIDer Guard — monitor of the file system in Linux OS): # drweb-ctl cfset SMBSpider.Start No Note that superuser privileges are required to perform this action. To elevate the privileges, you can use the sudo command, as shown in the following example: $ sudo drweb-ctl cfset SMBSpider.Start No Example usage of the find utility to select files for scanning (the drweb-ctl scan --stdin command): 1)Scan all files in all directories, starting from the root directory, on the same partition of the file system: $ find / -xdev -type f | drweb-ctl scan --stdin 2)Scan all files in all directories, starting from the root directory, except files residing in the /var/log/messages and /var/log/syslog directories: $ find / -type f ! -path /var/log/messages ! -path /var/log/syslog | drweb-ctl scan –stdin 3)Scan all files of the root user in all directories, starting from the root directory: $ find / -type f -user root | drweb-ctl scan --stdin 4)Scan files of the root and admin users in all directories, starting from the root directory: $ find / -type f \( -user root -o -user admin \) | drweb-ctl scan --stdin 5)Scan files of users with UID in the range 1000 - 1005 in all directories, starting from the root directory: $ find / -type f -uid +999 -uid -1006 | drweb-ctl scan --stdin 6)Scan files in all directories, starting from the root directory, with a nesting level not more than five: $ find / -maxdepth 5 -type f | drweb-ctl scan --stdin 7)Scan files in a root directory ignoring files in subdirectories: $ find / -maxdepth 1 -type f | drweb-ctl scan --stdin 8)Scan files in all directories, starting from the root directory, with following all symbolic links: $ find -L / -type f | drweb-ctl scan --stdin 9)Scan files in all directories, starting from the root directory, without following symbolic links: $ find -P / -type f | drweb-ctl scan --stdin 10)Scan files created not later than July 3, 2013 in all directories, starting with the root directory: $ find / -type f -newermt 2013-07-03 | drweb-ctl scan --stdin |