Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

head

The head command in Linux is a versatile tool used to display the beginning of a file. By default, it shows the first six lines, making it ideal for quickly previewing large files without reading through their entirety.

Examples:

head filename


Displays the first ten lines of filename.

head -n 16 file.txt

Displays the first 16 lines of file.txt.

head < log.txt

Redirect a file to head.

The head command is an essential utility for initial data inspection and is simple yet powerful, making it indispensable in shell scripting and command-line usage.

Add Your Heading Text Here

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Linux Commands and Tools

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.