Veritas Access Appliance Cloud Storage Tiering Solutions Guide

Last Published:
Product(s): Appliances (8.0)
Platform: Access Appliance OS,Veritas 3340,Veritas 3350

About pattern matching for data movement policies

Within a policy, you can use a pattern to specify that the rule applies to file names or directory names that match the pattern. By using a pattern, you do not need to know the exact file name in advance; the files that match the pattern are selected dynamically.

A pattern uses special characters, which are case sensitive. There are the following types of patterns:

  • Directory patterns

    A pattern that ends with a slash (/) is matched only against directories.

  • File patterns

    A pattern that does not end with a slash (/) is matched only against files.

The following is a list of supported special characters and their meanings:

* (asterisk)

Matches any character any number of times.

? (question mark)

Matches any single character.

** (two asterisks)

Matches across child directories recursively.

The pattern fs1/*/*.pdf will match .pdf file names present after first sub-directory of fs1/. For example, if the following files exist:

fs1/dir1/a.pdf

fs1/dir2/b.pdf

fs1/dir3/dir4/c.pdf

dir5/d.pdf

e.pdf

then the pattern fs1/*/*.pdf will match only a.pdf and b.pdf. It will not match c.pdf, d.pdf and e.pdf.

The pattern fs1/**/*.pdf will match .pdf files in any directory after fs1. For the above file list, it will match all of the files: a.pdf, b.pdf, and c.pdf.

The pattern **/*.pdf will match all the .pdf files in the whole file system. For the above file list, it will match all of the files: a.pdf, b.pdf, c.pdf, d.pdf and e.pdf.

[ ] (square brackets)

Matches either range or set of characters. [0-5] will match any character in range of 0 to 5. [a-g] will match any character in range of a to g. [abxyz] will match any one character out of a,b,x,y,z.

! (exclamation point)

Can be used as the first character in a range to invert the meaning of the match. [!0-5] will match any character which is not in range of 0 to 5.

\ (backslash)

Can be used as an escape character. Use this to match for one of the above pattern matching characters to avoid the special meaning of the character.