head
The head utility copies the specified number of lines from the starting of the file to the standard output. Head copies lines from the standard input if no filename is provided. The default value is 10 lines.
Syntax
head [- number] file
Practice 1
Let consider the file mybook which holds 16 lines. The following example shows the use of the head command.
# head mybook
This is my first book.
I am trying to a write. Here, I test my skill in writing. I leave 2 lines blank.
You may be wondering Why?
Because, I am a writer and I have to think.
I want to write but nothing seems to be coming out.
I have severe constipation of ideas.
Here because the numberof lines have not been particular, the first 10 lines (default value) of mybook are displayed.