Skip to content

Instantly share code, notes, and snippets.

@studgeek
Created February 25, 2012 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save studgeek/1909180 to your computer and use it in GitHub Desktop.
Save studgeek/1909180 to your computer and use it in GitHub Desktop.
Cygwin script that lists the files most scanned by Avast
#!/bin/bash
# Cygwin script that lists the files most scanned by Avast.
# Useful for determing files that are scanned way too much that you probably want to exclude
# in the File System Shield. Note that they are still scanned in the scheduled scans.
# @studgeek 2/1/12
#
# To use this script you need to have the File System Shield reporting turned on
# at File System Shield >> Settings >> Report file. Use the following settings. You need
# to stop/start the File System Shield to get the reporting started.
# File name: *
# File Type: "Plain text"
# If file exists: "Append"
# Ok items: checked
#
# If you want to see the top files in alphabetical order simply pipe to sort
# avastMostScanned.sh | sort -k 2
#
# After you have setup a bunch of exclusions its best to clear the log file so you can see what is still
# being scanned. To do that stop the File System Shield, delete the FileSystemShield.txt file, then
# start the shield again.
#
NUMBER_FILES_TO_LIST=50
REPORTPATH="`cygpath "$ALLUSERSPROFILE"`/Application Data/AVAST Software/Avast/report/FileSystemShield.txt"
awk -F'\t' 'NF==2 { sub(/ \[\+\] is OK$/,""); print $2 }{}' "$REPORTPATH" | sort | uniq -c | sort -k 1 -r | head -n $NUMBER_FILES_TO_LIST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment