head Command Purpose Displays the first few lines or bytes of a file or files. Syntax head [ -Count | -c Number | -n Number ] [ File ... ] Description The head command writes to standard output a specified number of lines or bytes of each of the specified files, or of the standard input. If no flag is specified with the head command, the first 10 lines are displayed by default. Flags -Count Specifies the number of lines from the beginning of each specified file to be displayed. The Count variable must be a po- sitive decimal integer. This flag is equivalent to the -n Number flag, but should not be used if portability is a consideration. -c Number Specifies the number of bytes to display. The Number variable must be a positive decimal integer. -n Number Specifies the number of lines from the beginning of each specified file to be displayed. The number variable must be a positive decimal integer. This flag is equivalent to the -Count flag. Exit Status This command returns the following exit values: 0 Successful completion. >0 An error occurred. Examples To display the first five lines of the Test file, enter: head -5 Test OR head -n 5 Test Implementation Specifics This command is part of Base Operating System (BOS) Runtime. Related Information Files Overview in AIX Version 3.2 System User's Guide: Base and Devices. Input and Output Redirection Overview in AIX Version 3.2 System User's Guide: Base and Devices. The tail command.