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

READ ALL ABOUT IT!

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: