Send documentation comments to mdsfeedback-doc@cisco.com
1-30
Cisco MDS 9000 Family Command Reference
OL-8413-07, Cisco MDS SAN-OS Release 3.x
Chapter 1 CLI Overview
Using Command Aliases
Use the no cli var name command in configuration mode to remove user-defined CLI persistent
variables.
The following example removes a user-defined CLI persistent variable.
switch# config t
switch(config)# no cli var name mgmtport
System Defined Variables
Cisco MDS SAN-OS supports one predefined variable: TIMESTAMP. This variable refers to the time of
execution of the command in the format YYYY-MM-DD-HH.MM.SS.
Note The TIMESTAMP variable name is case sensitive. All letters must be uppercase.
The following example uses $(TIMESTAMP) when periodically gathering statistics into files using the
command scheduler.
switch# config t l
switch(config)# scheduler enable
switch(config)# scheduler logfile size 16
switch(config)# scheduler job name j1
switch(config-job)# show interface mgmt0 | include mgmt > file
switch(config-job)# copy volatile:file bootflash:file.$(TIMESTAMP)
switch(config-job)# end
switch(config)#
The following example uses $(TIMESTAMP) when redirecting show command output to a file.
switch# show running-config > rcfg.$(TIMESTAMP)
Preparing to copy....done
switch# dir volatile:
7231 Oct 03 20:20:42 2005 rcfg.2005-10-03-20.20.42
Usage for volatile://sup-local
8192 bytes used
20963328 bytes free
20971520 bytes total
Using Command Aliases
Command alias support has the following characteristics:
• Command aliases are global for all user sessions.
• Command aliases are persist across reboots.
• Commands being aliased must be typed in full without abbreviation.
• Command alias translation always takes precedence over any keyword in any configuration mode or
submode.
• Command alias support is only available on the supervisor module, not the switching modules.
• Command alias configuration takes effect for other user sessions immediately.
• You cannot override the default command alias alias, which aliases the show cli alias.