System-Defined Variables; Using Command Aliases - Cisco AP776A - Nexus Converged Network Switch 5020 Configuration Manual

Cisco mds 9000 family cli configuration guide - release 4.x (ol-18084-01, february 2009)
Hide thumbs Also See for AP776A - Nexus Converged Network Switch 5020:
Table of Contents

Advertisement

Chapter 2
Before You Begin
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
switch# config t
switch(config)# no cli var name mgmtport

System-Defined Variables

Cisco MDS NX-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)# feature scheduler
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:
OL-18084-01, Cisco MDS NX-OS Release 4.x
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.
Nesting of command aliases is permitted to a maximum depth of 1. One command alias can refer to
another command alias that must refer to a valid command, not to another command alias.
A command alias always replaces the first command keyword on the command line.
rcfg.2005-10-03-20.20.42
Cisco MDS 9000 Family CLI Configuration Guide
Using Command Aliases
2-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents