C i s c o C o n f i d e n t i a l - B e t a R e v i e w R 3 . 7. 1
Utility Commands on Cisco IOS XR Software
utility head
SMR-755
Cisco ASR 14000 Series Router System Management Command Reference
OL-17231-01
utility head
To copy bytes or lines at the beginning of a file or from the standard input, use the
utility head
command
in EXEC mode or administration EXEC mode.
utility head
[
bytes
] [
count
number
] [
file
source
] [
usage
]
Syntax Description
Defaults
If the
utility head
command is entered without keywords or arguments, the first ten lines of the file or
standard output are copied.
If no file is specified, then the standard input is used.
Command Modes
EXEC
Administration EXEC
Command History
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper
task IDs.
The
utility head
command copies the beginning bytes (default) or lines of one or more files to the
standard output (usually the user interface display). Use the
bytes
or
lines
keywords to copy the data
based on lines or bytes. Use the
count
number
option to specify the number of bytes or lines to copy. By
default, the
utility head
command copies the first 10 lines of each file.
If more than one file is selected, an identifying header is added before the output for each file. If no file
is specified, then the standard input (keyboard) is used.
Note
Keywords are entered using the displayed syntax, or with UNIX-equivalent syntax. The
UNIX-equivalent syntax is displayed in parentheses () in the syntax description. To display the
UNIX-equivalent syntax online, enter the keyword
usage
.
bytes
(Optional) (
-c
) Copies the data in bytes from the beginning of each specified
file. The default setting is to copy lines of data.
count
number
(Optional) (
-n
) Specifies the number of lines (default) or bytes to be copied.
The
number
argument is an unsigned decimal integer.
By default, the
utility head
command copies the first ten units (lines or
bytes) of the file. Use the
count
number
option to change the default.
file
source
(Optional) Specifies the storage device, directory, and filename for the files.
If a file is not specified, the standard input is used.
usage
(Optional) Displays the UNIX options supported by this command.
Release
Modification
Release 3.7.1
This command was introduced on the Cisco ASR 14000 Series Router.