Supported Wildcards for the IBM i File System Agent
Updated
You can use a wildcard to represent one or more characters when you define the content for backups and filters for a subclient.
Note
If the subclient content consists of wildcard characters and no eligible files are found for the backup, the backup operation can still successfully complete.
Wildcards
Description
Examples
*
Any number of characters.
Use this wildcard in the following scenarios
Back up all files of a specific extension
Back up all files under a specific directory
Back up all files with a specific file extension that start with the pattern
*.doc backs up or filters all files that have a .doc file extension (for example, status.doc, mission.doc) on all partitions and paths on the client computer.
/Test/*.doc backs up all that have a .doc file extension in the /Test directory.
a*.so backs up all files that have the .so file extension, and start with the letter "a" (for example, alsvc.so, advdcc.so).
/Finance/Test* backs up all the files and directories that start with the string "Test" under the /Finance directory.
?
A single character.
Use this wildcard in the following scenario:
All files (or directories) that match the character pattern before and after the ?
Tip: To match multiple characters, use a ? for each character that you want to match.
/access? backs up or filters any directory or file that starts with the string "access", followed by one character (for example, access1 or access5).
/Class/report? backs up any directory or file under the /Class directory that starts with the string "report" and contains one character after the string (for example, "report1").
[]
A range of characters.
/[a-m]* backs up or filters all files that start with the letters a-m on the / (root) partition.
/[AEIOU]*.doc backs up files that have a .doc file extension and that start with the letters "A", "E", "I", "O", or "U".
/Finance/report[1-47-9] backs up the following files in the /Finance directory:
report1
report2
report4
report7
report8
report9
/Department-[A-CS] backs up the following files:
Department-A
Department-B
Department-C
Department-S
[!]
The negation of a set or range of characters.
Use the wildcard in the following scenario:
Back up all files in a directory that do not match the characters specified in the wildcard
/root/[!AEIOU]*.doc backs up or filters files that have a .doc file extension in the /root directory and that start with a letter other than the letters "A", "E", "I", "O", or "U".
**
Any number of characters across any number of path levels.
/**/move.cpp - backs up or filters the file named move.cpp that is in any directory. (for example, /root/newapp/move.cpp and /opt/kde3/src/move.cpp)
/etc/** - backs up all directories and files under the /etc directory. All sub-directories are included in the backup.
***
Applies only to filters and exceptions.
Use this wildcard in the following scenarios:
To filter the directory/library and the objects that are under it.
To add an exception to the filter.
The filter /QSYS.LIB/ABC.LIB/*** filters the library ABC and the library contents.
The filter QSYS.LIB/*** and the exception /QSYS.LIB/ABC.LIB/*** backs up the ABC library and all the contents of that library.