This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
head [options] [files]
Print the first few lines (default is 10) of one or more files. If files is missing or -, read from standard input. With more than one file, print a header for each file.
Display the first 20 lines of phone_list:
head -20 phone_list
Display the first 10 phone numbers having a 202 area code:
grep '(202)' phone_list | head