Unix

Head Command in Unix/Linux

The head command is used to print first N lines from the file to the terminal.
The syntax of the head command is
 
The options are


Example of head command 
  • Display first 10 lines. 

By default head command prints first 10 lines from file.
  • Display first N lines.  

  • Display first 3 lines. 



Powered by Blogger.