About CLI commands
A description of the components and structure of a command-line interface command.
A command-line interface command consists of the following types of components, arranged in the following order:
- The command name.
- The command flags and flag parameters.
- One or more command parameters, each followed by any sub parameters it might require.
The command name specifies the task that the command-line interface is to complete. For example, lsarraysite tells the command-line interface to list array sites, and mklcu tells the command-line interface to create a logical control unit.
Flags modify the command. They provide additional information that directs the command-line interface to complete the command task in a specific way. For example, the -h flag tells the command-line interface to display the reference page for the command. Some flags can be used with every command-line interface command. Others are specific to a command and are invalid when used with other commands. Flags are preceded by a hyphen (-), and can be followed immediately by a space and a flag parameter.
Flag parameters provide information that is required to implement the command modification that is specified by a flag. For example, the -user flag requires a user_name parameter, and the -passwd flag requires a password parameter. Flag parameters are variables, their value changes to meet your needs. Every user has a different user name and password. Not all flags require parameters. In this case, the flag itself provides all the information that is necessary. Some flag parameters are optional and might allow the use of multiple values. These values must be separated with a comma and no white space between the values. If you do not provide a parameter, then a default value is assumed. For example, you can specify -v on, or -v off to turn verbose mode on or off; but specifying -v only, results in an error.
The command parameter provides basic information that is necessary to complete the command task. When a command parameter is required, it is always the last component of the command; and it is not preceded by a flag. Some commands permit multiple command parameters with each parameter that is separated by a white space and not a comma (unlike flag parameters that allow multiple values). Some commands, like lsuser, do not require a command parameter because a default value of all is always assumed. For some commands, like lsarraysite, the command parameter is optional. If no value is provided, then a default value of all is assumed. If a value is provided, then the command-line interface lists information only about the array site or sites that are provided in the command parameter string.
In the following example, lsrank is the command name. -dev and -l are command parameters. IBM.2107–75FA120 is the sub parameter for the -dev parameter, and R1, R2, and R3 are a list of command parameters. Note that the banner is not listed for all examples provided in this document.