This topic provides information about using wildcards in the SAN Volume Controller CLI.
The SAN Volume Controller CLI allows the use of the '*' as a wildcard within the arguments of certain parameters. There are some behavioral issues that must be considered when using wildcards in order to prevent unexpected results. These behavioral issues, and the ways to avoid them, are described below.
The shell will attempt to interpret any of the special characters if they are not escaped. Wildcards will be expanded into a list of files if any files exist that match the wildcards. If no matching files exist, the wildcard is passed to the SAN Volume Controller command untouched.
To prevent expansion, issue the
following command in one of its formats:
svctask cleardumps -prefix '/dumps/*.txt'
in single quotes, or
svctask cleardumps -prefix /dumps/\*.txt
using a backslash, or
svctask cleardumps -prefix "/dumps/*.txt"
in double quotes.
This is slightly more complicated since the host shell will process the command line before it is passed through SSH to the shell on the cluster. This means an extra layer of protection is required around the wildcard as the host shell will strip off any protecting quotes and, if the wildcard is exposed to the host shell, then this will result in the wildcard being expanded in the host shell rather than in the cluster shell.
To prevent expansion, issue
the following command in one of its formats:
svctask cleardumps "'/dumps/*.txt'"
with single quotes inside double quotes, or
svctask cleardumps '/dumps/\*.txt'
using a backslash inside single quotes, or
svctask cleardumps '"/dumps/*.txt"'
with double quotes inside single quotes.