2. PanCLI Usage Basics
2.1 Connect to PanCLI
You can connect to PanCLI by connecting to the director host via ssh. You must use the login and password for the VDURA administrator. If configured, you may also log in as guest.
The PanCLI interface is case sensitive. After you type a command at the system prompt, press Enter to execute the command. The PanCLI interface supports VT-100 command-line editing.
2.2 Display Online Help
You can display help for PanCLI commands by entering a question mark (?) after the command or typing help and the command. For example:
arp ?
or
help arp
2.3 General Navigation
General navigation features within PanCLI include the following:
| Keystroke | Description |
|---|---|
? |
Display a list of all commands. |
[command-name] ? |
Display help for a specific command. |
[command-prefix] TAB |
Complete the partial command, starting with the given prefix. |
[command-prefix] TAB TAB |
Display the list of commands, starting with the given prefix. |
The PanCLI interface is based on Tcl shell and uses double quotes or curly braces to group arguments. Single quotes are not special characters in this shell. The following special characters must be escaped (preceded by a backslash) to be used in this shell:
` " ; | * ? & < > () [ ] { } $ \
2.4 Edit Lines
The following table describes the PanCLI interface editing features.
| Keystroke | Description |
|---|---|
| Ctrl-P or the up arrow key | Move the cursor to the previous line in the command. |
| Ctrl-N or the down arrow key | Move the cursor to the next line in the command. |
| Ctrl-B or the left arrow key | Move the cursor back one character. |
| Ctrl-F or the right arrow key | Move the cursor forward one character. |
| Ctrl-A | Move the cursor to the beginning of the line. |
| Ctrl-E | Move the cursor to the end of the command line. |
| Ctrl-W | Cut a region of text. |
| Ctrl-Y | Paste a region of text. |
| Ctrl-K | Delete from the cursor to the end of the line. |
| Ctrl-D | Delete forward one letter. |
| Ctrl-U | Delete to beginning of the line. |
| Meta-B followed by Ctrl-K | Delete to beginning of the word. |
| Ctrl-C | Quit the currently running command. |
2.5 Meta Character Syntax
The following conventions are used to describe PanCLI command syntax:
| Convention | Description |
|---|---|
[X] |
Required parameter |
?X? |
Optional parameter |
X\|Y |
Alternative parameters |
... |
A list of parameters |
Service mode commands and the pan_* tools follow standard UNIX usage notation instead, in which square brackets [ ] mark an optional parameter.
2.6 Support for Pipe
You can pipe to the following commands in PanCLI:
more, zmore, less, zless, grep, egrep, zgrep, head, tail, awk, cut, sort, uniq, wc, xargs
All other pipe requests will be passed as arguments to the initial command.
| Operator | Description |
|---|---|
\| |
Separates distinct commands in the pipeline. The standard output of the preceding command will be piped into the standard input of the next command. |
\|& |
Separates distinct commands in the pipeline. Both standard output and standard error of the preceding command will be piped into the standard input of the next command. This form of redirection overrides forms such as 2> and >&. |
2.7 Output Redirect Options
PanCLI supports the following file output redirect options:
| Option | Description |
|---|---|
>& fileName |
Both standard output from the last command and standard error from all commands are redirected to the file named fileName, overwriting its previous contents. |
>> fileName |
Standard output from the last command is redirected to the file named fileName, appending to it rather than overwriting it. |
2>> fileName |
Standard error from all commands in the pipeline is redirected to the file named fileName, appending to it rather than overwriting it. |
>>& fileName |
Both standard output from the last command and standard errors from all commands are redirected to the file named fileName, appending to it rather than overwriting it. |
>@ fileId |
FileId must be the identifier for an open file, such as the return value from a previous call to open. Standard output from the last command is redirected to fileId’s file, which must have been opened for writing. |
2>@ fileId |
FileId must be the identifier for an open file, such as the return value from a previous call to open. Standard error from all commands in the pipeline is redirected to fileId’s file. The file must have been opened for writing. |
>&@ fileId |
FileId must be the identifier for an open file, such as the return value from a previous call to open. Both standard output from the last command and standard error from all commands are redirected to fileId’s file. The file must have been opened for writing. |
2.8 Glob Pattern Matching
PanCLI supports a number of standard UNIX commands. For these commands, filename substitution is supported. For any arguments to the UNIX commands, if the word contains any of the special glob characters, it is a candidate for filename substitution, also known as globbing. This word is then regarded as a pattern (glob-pattern), and replaced with an alphabetically sorted list of file names which match the pattern. To avoid globbing, precede any special glob characters with two backslashes. Special characters include:
| Character | Description |
|---|---|
? |
Match any single character. |
* |
Match any sequence of zero or more characters. |
\[chars\] |
Match any single character in chars. If chars contains a sequence of the form a-b then any character between a and b (inclusive) will match. |
\x |
Match the character x. |
{a,b,...} |
Match any of the strings a, b, etc. |
~ |
Words beginning with ~ refer to the home directory. |