head(1)

head(1)

NAME

 

head - give ®rst few lines

 

SYNOPSIS

 

head [-c-l][-n count ] [ ®le

... ]

Obsolescent:

 

head [-count] [ ®le ... ]

 

DESCRIPTION

head prints on standard output the ®rst count lines of each of the speci®ed ®les, or of the standard input. If count is omitted it defaults to 10.

If multiple ®les are speci®ed, head outputs before each ®le a line of this form:

==> ®le <==

Options

The quantity of output is measured in bytes.

 

-c

 

-count

The number of units of output. This option is provided for backward compatibility (see

-n

 

below) and is mutually exclusive of all other options.

 

-l

The quantity of output is measured in lines; this is the default.

 

-ncount

The number of lines (default) or bytes output. count is an unsigned decimal integer. If

-n

 

(or -count) is not given, the default quantity is 10. This option provides the same func-

 

tionality as the -countoption, but in a more standard way. Use of the -noption is recom-

 

mended where portability between systems is important.

 

EXTERNAL INFLUENCES

Environment Variables

LC_CTYPE determines the interpretation of text within ®le as single and/or multi-byte characters.

LC_MESSAGES determines the language in which messages are displayed.

If LC_CTYPE or LC_MESSAGES is not speci®ed in the environment or is set to the empty string, the value of LANG is used as a default for each unspeci®ed or empty variable. If LANG is not speci®ed or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.

If any internationalization variable contains an invalid setting, head behaves as if all internationalization variables are set to "C". See environ(5).

International Code Set Support

Single- and multi-byte character code sets are supported.

WARNINGS

The length of the input lines is limited to {LINE_MAX} bytes.

SEE ALSO

tail(1), cat(1), more(1), pg(1).

STANDARDS CONFORMANCE head: SVID3, XPG4, POSIX.2

h

HP-UX Release 11i: December 2000

− 1 −

Section 1343