CMShell commands

This topic covers example CMShell syntax and command responses.

Syntax basics

In these examples, it is important that you note the following:

Syntax Object/Variable Description
Elipses (...) This indicates that the component that precedes it can be repeated. For example, multiple instances of the component can be provided to, include multiple sources for moving, copying or deleting.
Square Brackets ([ ] ) The content within must be included in square brackets. In some instances, an individual component must exist in a single set of brackets ([-a]), while in others, multiple components can be included in a single set ([-aldc]). Unless specifically noted in a command’s description, only a single option/component can be included in a set of square brackets.
Angle Brackets (< > ) Unless specifically noted in the description of a command, angle brackets indicate a variable value that you must provide. In these cases, the < > characters are not included in the syntax.
Paths Any path in the syntax targeting a storage group must be prefaced by the appropriate numeric “CP Code Root.” This is represented as “123456” in these examples.
Important: Operations are restricted to existing directory trees

CMShell requires that all operations use pre-existing paths. CMShell doesn't create a non-existent directory during command operations.

Regarding Option Formats With some options, you can achieve the same result by inputting the short or long format. A command may be revealed options as follows:
  • -a, --action- When you see this as an Option type in a table, you can include either -a or --action to accomplish the same result.

  • -a, --action=<variable> - You can use either option format to accomplish the same result, but both must be accompanied by an appropriate variable (For example, -a=<variable> or --action=<variable> achieve the same result.)

Wildcard Support CMShell supports the following wildcards:
  • *: Asterisk ( * )
  • ?: Question mark ( ? )

Command responses

Once a CMShell command is issued, one of three responses will be returned after processing:

Response Description
“0” This indicates the command was executed successfully.
“1” An error has occurred. Check that the syntax of the command was formatted properly, and re-issue it. If issues still arise, contact Technical Support.
“255” The SSH connection has failed. Verify that you are properly connected via SSH, and try again.