Contents[Hide]
Table of Contents

 

1. Name

head - output the first part of files

2. Synopsis

head [OPTION]... [FILE]...

3. Description

Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.

-c, --bytes=[-]N
print the first N bytes of each file; with the leading ‘-’, print all but the last N bytes of each file
-n, --lines=[-]N
print the first N lines instead ofthe first 10; with the leading ‘-’, print all but the last N lines of each file
-q, --quiet, --silent
never print headers giving file names
-v, --verbose
always print headers giving file names
--help
display thishelp and exit
--version
output version information and exit

N may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.

4. Author

Written by David MacKenzie and Jim Meyering.

5. Reporting Bugs

Report bugs to <This email address is being protected from spambots. You need JavaScript enabled to view it.>. Copyright © 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html >
This isfree software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

7. See Also

The full documentation for head is maintained as a Texinfo manual. If the info and head programs are properly installed at your site, the command
info head

should give you access to the complete manual.

 


Table of Contents

 



Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top