Skip Navigation

macOS
examples of wildcards used in memory protection exclusions

The following examples are based on excluding an executable that is stored in the following path:
/Application/TestApp/MyApp/program.dmg
Type
Description
Correct use of exclusions
Excludes program.dmg as long as program.dmg is located under the "MyApp" child directory
:
/Application/**/MyApp/program.dmg
Excludes any executable with the .dmg as long as the it is located under the "MyApp" child directory
:
/Application/**/MyApp/*.dmg
Excludes any executable as long as it is located under the "MyApp" child directory
:
/Application/**/MyApp/*
Excludes program.dmg as long as it is located in any directory that is a child of the "TestApp" directory
:
/Application/TestApp/**/program.dmg
Incorrect use of asterisks in exclusions
Only use a single asterisk (*) to match characters in a folder name or file name. Double asterisks (**) are reserved to match directory paths and cannot be used at the end of an exclusion.
The following is a list of examples in the context of excluding
/Application/TestApp/MyApp/program.dmg
.  
    • Incorrect:
      /Application/TestApp/MyApp/pro**am.dmg
    • Correct:
      /Application/TestApp/MyApp/progra*.dmg
    • Incorrect:
      /Application/**
    • Correct:
      /Application/**/*
Exclusions that are not recommended
Avoid using a double asterisk (**) at the beginning of an exclusion. For example:
/**/program.dmg
In this example,
program.dmg
is allowed to run from any folder on the drive. Although this exclusion is technically correct, it would exclude anything in any directory (including child directories) located on the drive.