head

Description

Output the first part of files.

Syntax

head [OPTION]... [FILE]...

Practical uses

  • head: Print the first 10 lines of each FILE to standard output.
  • head -n20 or head -20: Print the first NUM lines instead of the first 10.
  • head -c20: Print the first NUM bytes of each file.
  • head -q: Never print headers giving file names.