ONTAP 9

to Japanese version

Methods of using query operators

The management interface supports queries and UNIX-style patterns and wildcards to enable you to match multiple values in command-parameter arguments.

The following table describes the supported query operators:

Operator Description

*

Wildcard that matches all entries.

For example, the command volume show -volume *tmp* displays a list of all volumes whose names include the string tmp.

!

NOT operator.

Indicates a value that is not to be matched; for example, !vs0 indicates not to match the value vs0.

|

OR operator.

Separates two values that are to be compared; for example, vs0 | vs2 matches either vs0 or vs2. You can specify multiple OR statements; for example, a | b* | *c* matches the entry a, any entry that starts with b, and any entry that includes c.

..

Range operator.

For example, 5..10 matches any value from 5 to 10, inclusive.

<

Less-than operator.

For example, <20 matches any value that is less than 20.

>

Greater-than operator.

For example, >5 matches any value that is greater than 5.

<=

Less-than-or-equal-to operator.

For example, ⇐5 matches any value that is less than or equal to 5.

>=

Greater-than-or-equal-to operator.

For example, >=5 matches any value that is greater than or equal to 5.

{query}

Extended query.

An extended query must be specified as the first argument after the command name, before any other parameters.

For example, the command volume modify {-volume *tmp*} -state offline sets offline all volumes whose names include the string tmp.

If you want to parse query characters as literals, you must enclose the characters in double quotes (for example, “^”, “.”, “*”, or “$”) for the correct results to be returned.

You can use multiple query operators in one command line. For example, the command volume show -size >1GB -percent-used <50 -vserver !vs1 displays all volumes that are greater than 1 GB in size, less than 50% utilized, and not in the storage virtual machine (SVM) named “vs1”.

Top of Page