Sysadmin tools: Viewing text in Linux with tail and head | Linux Today

Sysadmin tools: Viewing text in Linux with tail and head

Written By
AW
Amit Waghmare
Apr 21, 2020

There are many commands to view the contents of files in Linux. Among those, the tail and head commands print the output of the last and first ten lines of a file, respectively. In some cases, the output or error of your submitted job or script creates a very big file and the most recent result prints at the end of the file. You can use tail, instead of the cat command, to just view the last few lines of the file. Sometimes you need multiple options with the tail command to view the contents of the file correctly.

AW

Amit Waghmare

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.