Viewing files with cat, more, less, head, and tail

READ ALL ABOUT IT!

Article from Issue 64/2006
Author(s):

Practical tools such as cat, less, and head are convenient for viewing text.

You don’t always need to launch an editor to view text files at the console. More often than not, a simple viewer is far quicker. But the programs we will be looking at in this month’s issue have a lot more tricks up their sleeves. If you are looking for a fast approach to concatenating multiple files in a single file, cat is the tool you need. This article also looks at tips for the more and less pagers, showing you more convenient approaches to using these tools. And if you are just interested in grabbing the first or last few lines of a file, head and tail are the tools you need. Catwalk

cat lets you output a text file via standard output:

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News