CLI commands and parameters

Command-line interface (CLI) commands and parameters are represented in the syntax diagram.

The system command-line interface offers command line completion for command entry. Command line completion allows you to type in the first few characters of a command and press the Tab key to fill in the rest of the command name. If there are multiple commands that start with the same characters, then a list of possible commands is returned. You can type in more characters until the command name is unambiguous.

CLI parameters can be entered in any order except in the following situations:
  • When a command name is specified, the first argument given must be the action that you want to be performed.
  • Where you are specifying a command against a specific object, the object ID or name must be the last argument in the line.
A valid parameter meets the following requirements:
  • Parameters can be entered in any order.
  • If a parameter has an associated argument, the argument must always follow the parameter.
  • A parameter must start with a '-'; otherwise, it is assumed to be an argument.
  • The maximum length of any single parameter that can be entered into the CLI is 128 bytes.
  • An argument can contain multiple data items. The maximum number of data items that you can enter into such a list is 128. For a component list, separate the individual items by a colon.
  • Any parameter with an argument can be entered as -parameter=argument.
  • Entering -param= means the argument is an empty string, equivalent to -param.
  • The symbol '--' is valid as the next to last entry on the command line. It specifies that the next entry is the target object name or ID, even if it begins with a hyphen.
    chuser -usergrp=-usergrp -- -password
  • The symbol '--' is valid as the final word on the command line.

Examples that are valid

mkuser -name fred -usergrp 0 -password buckets
mkuser -name fred -usergrp 0 -password=buckets
mkuser -name=-barney -usergrp=0 -password=buckets

chuser -usergrp 1 fred
chuser -usergrp 1 -- fred
chuser -usergrp 1 -- -barney

Examples that are invalid

chuser -usergrp 1 fred --
chuser -usergrp 1 -- fred --
chuser -- -usergrp 1 fred
chuser -usergrp 1 -barney