T Commands

This chapter describes the basic Cisco NX-OS system commands that begin with T.

tail

To display the last lines of a file, use the tail command.

tail [ filesystem : [// server /]] [ directory ] filename [ lines ]

 
Syntax Description

filesystem :

(Optional) Name of the file system. Valid values are bootflash, modflash, or volatile.

// server /

(Optional) Name of the server. Valid values are ///, //module-1/, //sup-1/, //sup-active/, or //sup-local/. The double slash (//) is required.

directory

(Optional) Name of a directory. The directory name is case sensitive.

filename

Name of the file to display. The filename is case sensitive.

lines

(Optional) Number of lines to display. The range is from 0 to 80.


Note There can be no spaces in the filesystem://server/directory/filename string. Individual elements of this string are separated by colons (:) and slashes (/).


 
Command Default

Displays the last 10 lines.

 
Command Modes

EXEC mode

 
Command History

Release
Modification

5.0(2)N1(1)

This command was introduced.

Examples

This example shows how to display the last 10 lines of a file:

switch# tail bootflash:startup.cfg
 

This example shows how to display the last 20 lines of a file:

switch# tail bootflash:startup.cfg 20
 

 
Related Commands

Command
Description

cd

Changes the current working directory.

copy

Copies files.

dir

Displays the directory contents.

pwd

Displays the name of the current working directory.

terminal length

To set the number of lines of output to display on the terminal screen for the current session before pausing, use the terminal length command. To revert to the default, use the no form of this command.

terminal length lines

terminal no length

 
Syntax Description

lines

Number of lines to display. The range is from 0 to 511. Use 0 to not pause while displaying output.

 
Command Default

The initial default for the console is 0 (do not pause output). The initial default for virtual terminal sessions is defined by the client software. The default for the no form is 24 lines.

 
Command Modes

EXEC mode

 
Command History

Release
Modification

5.0(2)N1(1)

This command was introduced.

 
Usage Guidelines

The session pauses after displaying the number of lines set in the terminal length. Press the space bar to display another screen of lines or press the Enter key to display another line. To return to the command prompt, press Ctrl-C.

The terminal length setting applies only to the current session.

Examples

This example shows how to set the number of lines of command output to display on the terminal before pausing:

switch# terminal length 28
 

This example shows how to revert to the default number of lines:

switch# terminal no length
 

 
Related Commands

Command
Description

show terminal

Displays the terminal session configuration.

terminal session-timeout

To set the terminal inactivity timeout for the current session, use the terminal session-timeout command. To revert to the default, use the no form of this command.

terminal session-timeout minutes

terminal no session-timeout

 
Syntax Description

minutes

Number of minutes. The range is from 0 to 525600 minutes (8760 hours). Use 0 to disable the terminal inactivity timeout.

 
Command Default

Terminal session timeout is disabled (0 minutes).

 
Command Modes

EXEC mode

 
Command History

Release
Modification

5.0(2)N1(1)

This command was introduced.

 
Usage Guidelines

The terminal session inactivity timeout setting applies only to the current session.

Examples

This example shows how to set the terminal inactivity timeout for the session to 10 minutes:

switch# terminal session-timeout 10
 

This example shows how to revert to the default terminal inactivity timeout for the session:

switch# terminal no session-timeout
 

 
Related Commands

Command
Description

show terminal

Displays the terminal session configuration.

terminal terminal-type

To set the terminal type for the current session, use the terminal terminal-type command. To revert to the default, use the no form of this command.

terminal terminal-type type

terminal no terminal-type

 
Syntax Description

type

Type of terminal. The type string is case sensitive, must be a valid type (for example, ansi, vt100, or xterm), and has a maximum of 80 characters.

 
Command Default

For a virtual terminal, the terminal type is set during negotiation with the client software. Otherwise, vt100 is the default.

 
Command Modes

EXEC mode

 
Command History

Release
Modification

5.0(2)N1(1)

This command was introduced.

 
Usage Guidelines

The terminal type setting applies only to the current session.

Examples

This example shows how to set the terminal type:

switch# terminal terminal-type xterm
 

This example shows how to revert to the default terminal type:

switch# terminal no terminal-type
 

 
Related Commands

Command
Description

show terminal

Displays the terminal session configuration.

terminal width

To set the number of character columns on the terminal screen for the current line for a session, use the terminal width command. To revert to the default, use the no form of this command.

terminal width columns

terminal no width

 
Syntax Description

columns

Number of columns. The range is from 24 to 511.

 
Command Default

For a virtual terminal, the width is set during negotiation with the client software. Otherwise, 80 columns is the default.

 
Command Modes

EXEC mode

 
Command History

Release
Modification

5.0(2)N1(1)

This command was introduced.

 
Usage Guidelines

The terminal width setting applies only to the current session.

Examples

This example shows how to set the number of columns to display on the terminal:

switch# terminal width 70
 

This example shows how to revert to the default number of columns:

switch# terminal no width
 

 
Related Commands

Command
Description

show terminal

Displays the terminal session configuration.

traceroute

To discover the routes that packets take when traveling to an IP address, use the traceroute command.

traceroute { dest-addr | hostname } [ vrf { vrf-name | default | management }] [ source src-addr ]

 
Syntax Description

dest-addr

IP address of the destination device. The format is A . B . C . D.

hostname

Name of the destination device. The name is case sensitive.

vrf vrf-name

(Optional) Specifies the virtual routing and forwarding (VRF) to use. The name is case sensitive.

default

(Optional) Specifies the default VRF.

management

(Optional) Specifies the management VRF.

source src-addr

(Optional) Specifies a source IP address. The format is A . B . C . D. The default is the IPv4 address for the management interface of the switch.

 
Command Default

None

 
Command Modes

EXEC mode

 
Command History

Release
Modification

5.0(2)N1(1)

This command was introduced.

Examples

This example shows how to discover a route to a network device:

switch# traceroute 192.0.255.18 vrf management
 

 
Related Commands

Command
Description

ping

Displays the network connectivity to another network device.

traceroute6

Discovers the route to a device using IPv6 addressing.

traceroute6

To discover the routes that packets take when traveling to an IPv6 address, use the traceroute6 command.

traceroute6 { dest-addr | hostname } [ vrf { vrf-name | default | management }] [ source src-addr ]

 
Syntax Description

dest-addr

IPv6 address of the destination device. The format is A : B :: C : D.

hostname

Name of the destination device. The name is case sensitive.

vrf vrf-name

(Optional) Specifies the virtual routing and forwarding (VRF) instance. The name is case sensitive and can be a maximum of 32 alphanumeric characters.

default

(Optional) Specifies the default VRF.

management

(Optional) Specifies the management VRF.

source src-addr

(Optional) Specifies a source IPv6 address. The format is A : B :: C : D. The default is the IPv6 address for the management interface of the switch.

 
Command Default

None

 
Command Modes

EXEC mode

 
Command History

Release
Modification

5.0(2)N1(1)

This command was introduced.

Examples

This example shows how to discover a route to a device:

switch# traceroute6 2001:0DB8::200C:417A vrf management
 

 
Related Commands

Command
Description

ping6

Determines connectivity to another device using IPv6 addressing.

traceroute

Discovers the route to a device using IPv4 addressing.