Skip to content
Search

Head

lastmod 2023-03-09created 2015-10-202 edits

head is a command that shows a file from the beginning.

Example

By default, print only the first 10 lines:

$ head test

Print up to line 20:

head -n 20 test

Print the content up to 200 bytes:

head -c 200 test

See also

Favorite site

author Zer0 sitemap