Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/h/head.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/h/head.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/h/head.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/h/head.html on line 8

head

Copy the first part of files (POSIX)

Syntax:

head [-number] [-c|-l] [-n number] [file]...

Runs on:

Neutrino

Options:

-number
Deprecated; use -n number instead.
-c
Measure the quantity of output in bytes.
-l
(“el”) Measure the quantity of output in lines; this is the default unit of measure.
-n number
The number of lines (default) or bytes output. The number argument is an unsigned decimal integer. If you omit the -n number option, the default is the first ten units (lines or bytes) of the file.
file
The pathname of an input file. If you don't specify any files, the standard input is used.

Description:

The head utility copies its input files to the standard output. The utility ends the output for each file at a point designated by the -n number option. The number argument is counted in bytes if you choose the -c option, and in lines if you choose the -l option.

If you specify multiple files, head prints an identifying header before the output for each file.

Examples:

Display the first ten lines of all files in the current directory:

    head *

Print the first 16 bytes of myfile in hex:

    head -c -n 16 myfile | hd

(Note that in this case, the same functionality is offered through command-line options to hd.)

Exit status:

0
Successful completion.
>0
An error occurred.

See also:

cat, less, more, tail


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/h/head.html on line 129

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/h/head.html on line 129