Head

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

head gives you the first few lines.

If you want the first 100 lines:

$ head -100 <file>

Of course, it reads on stdin, so if you just want the first 100 lines of output:

$ ... | head -100

See also: cat, tail, less, Examining the contents of a file.