O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

head

Format:

head -number files 

Head is used to display the first ten lines of a file. To display less or more lines use the -number option. For example,

					$ head -1 myfile
				

will display the first line of the file only, and

					$ head -30 logfile |more
				

displays the first 30 lines of the file logfile.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required