head

From Juneday education
Jump to: navigation, search


Description

head - output the first part of files.

On this page we only give you a short introduction with a few examples. We encourage you to read the manual (man head).


"head is a program on Unix and Unix-like systems used to display the beginning of a text file or piped data." head

Example output

Output part of a file's content

$ head -1 one-file.txt
Hi there

Compare this to a printout of the entire content of the file:

$ cat one-file.txt
Hi there

This is just some text 
 
/John Doe