Linux scanning exclusions: wildcards

You can add scanning exclusions for Linux servers.

Caution Think carefully before you add scanning exclusions because doing so may reduce your protection.

Wildcards

You can use the wildcards shown in this table.

Token

Matches

* (Star)

Zero or more of any character including / (slash)

? (Question mark)

One single character.

Excluding a specific directory or file

You can exclude a specific directory or file by its full path. To exclude a directory, add a trailing slash and star. For example:

  • /mnt/hgfs/excluded excludes the file named excluded.
  • /mnt/hgfs/excluded/* excludes the directory named excluded and all directories and files below it in the filesystem.

Excluding a directory or file in any location

You can exclude a directory or file in any location by preceding it with a star and slash. For example:

  • */excluded excludes the file named excluded in any location.
  • */excluded/* excludes the directory named excluded in any location and all directories and files below it in the filesystem.

Examples

Here are some examples of exclusion expressions.

Expression

Items that are excluded

*/data/report

A file named report in a directory named data in any location

*.txt

Any file whose name ends in .txt in any location

/mnt/hgfs/data/*.txt

Any file whose name ends in .txt in the directory named /mnt/hgfs/data/

*/report??2020

Any file whose name begins with report followed by two characters and ends with 2020 in any location

*/report20??/*

Any directory in any location whose name begins with report20 and ends with two characters, and all directories and files below it in the filesystem