15 Uses of Cat Commands in Linux

A bash utility tool that can give you much convenience

Yang Zhou
TechToFreedom

--

cat
Photo by Mikhail Vasilyev on Unsplash

“Write programs that do one thing and do it well.”

This is the famous Unix philosophy.

There are many commonly-used Linux utilities following it, but the most typical example is the cat command.

The cat command literally just does one thing — print the content of a file onto the standard output.

Too simple to talk about? 🙂

This article will show you how to leverage such a basic command to implement complex operations through 15 using scenarios. After reading, you will not only feel how elegant Linux is, but also move your Linux skills into the next level.

1. Print the Content of a File onto the Standard Output

As mentioned, the only usage of the cat command is to display a file’s content on your terminal (standard output).

The syntax is cat file_name:

Results of “cat” commands

Of course, if you give the cat more files, it also can display multiple files’ content at the same time:

--

--