View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Head

From LQWiki

Jump to: navigation, search

Head is a program for viewing the first few lines of a file, or of some output of another program. If you run a command that gives many lines of output, but you're only interested in the very top, then head is exactly what you're looking for.

Usage

head [option] file

Examples

ls -lt | head

This has head reading from stdin and showing the 10 newest entries in a directory.

See also


Personal tools