linux/head

Show File Start

Output first part of files

filesystem
text

Command

head

Explanation

head is used to output the first part of files. It outputs the first part of the files.

Examples

Show first 10 lines

head file.txt

Show first 5 lines

head -n 5 file.txt