In some instances you may need to see the top of a file just like you may have needed to see the bottom of a file. To use the head command, do the same as you would with the tail command.
>head –20 hosts.allow
The output of this command starts from the top down (not the bottom up) and displays (by default) 10 lines from the top down instead of the bottom up.
Heads or Tails? Let's Flip for It! A good tip to remember when using head and tail is that when you are changing the default number of lines shown from 10, specify the amount of lines you do want to see. This can be done with the -# option that we just ...