System Defined Variables; Using Command Aliases - Cisco MDS 9000 series Command Reference Manual

Hide thumbs Also See for MDS 9000 series:
Table of Contents

Advertisement

Using Command Aliases

S e n d d o c u m e n t a t i o n c o m m e n t s t o m d s f e e d b a c k - d o c @ c i s c o . c o m
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.
The TIMESTAMP variable name is case sensitive. All letters must be uppercase.
Note
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:
Usage for volatile://sup-local
8192 bytes used
20963328 bytes free
20971520 bytes total
Using Command Aliases
Command alias support has the following characteristics:
Cisco MDS 9000 Family Command Reference
1-30
7231
Oct 03 20:20:42 2005
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.
rcfg.2005-10-03-20.20.42
OL-8413-07, Cisco MDS SAN-OS Release 3.x
Chapter 1
CLI Overview

Advertisement

Table of Contents
loading

Table of Contents