Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tail(1)



  head(1)                             CLIX                             head(1)



  NAME

    head - Outputs the first part of files

  SYNOPSIS

    head [-b] [-c] [-n #] [-qv] [+blocks] [+chars] [+lines] [+quiet] [+silent]
    [+verbose] [+number #] [file...]

    head [-#bclqv] [file...]

  FLAGS

    -b, +blocks  #        Print the first # 512-byte blocks.

    -c, +chars  #         Print the first # characters.

    -l, -n, +lines  #     Print the first # lines.

    -q, +quiet, +silent   Never print filename headers.

    -v, +verbose          Always print filename headers.

  DESCRIPTION

    This manual page describes the GNU version of the head command.  The head
    command prints the first part (10 lines by default) of each given file.
    It reads from standard input if no files are listed or when a filename of
    `-' is encountered.  If more than one file is listed, it prints a header
    consisting of the file's name enclosed in `==>' and `<==' before the
    output for each file.  It accepts two option syntaxes: one in which
    numbers are arguments to the option letters, and one in which the number
    precedes any option letters.

  EXAMPLES

    The following examples demonstrate the use of the head command.

    To print the first 50 characters of a file named file1, one of the
    following could be used:

    head -n 50 +chars file1

    or,

    head -50c file1


    To print the first 12 lines of two files, named file2 and file3, and
    prevent the filename headers from printing, one of the following could be
    used:



  2/94 - Intergraph Corporation                                              1






  head(1)                             CLIX                             head(1)



    head -n 12 -q file2 file3


    or,

    head +lines -n 12 +silent file2 file3


  EXIT VALUES

    The head command will return a value of 0 if it is successful and can
    "head" all files listed.  If there is a syntax error, the file is
    inaccessible, or the file is not found, the command will return a non-zero
    value.

  RELATED INFORMATION

    Commands: tail(1)




































  2                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026