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

4.0(0)N1(1a)

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.