Bash head

From NovaOrdis Knowledge Base
Revision as of 20:24, 18 February 2022 by Ovidiu (talk | contribs) (→‎Extract a Specific Line from a File)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

head is used to print the first ten lines (by default) or a specified number of lines.

head -15 <file>

Usage

Extract a Specific Line from a File

Extract a Specific Line from a File

Print the First 24 Characters of the First Line of the File

head -c 24 somefile