Getting Started with the cat Command

2165

The Linux cat and zcat commands are more useful than you may realize.

Cat is a fairly simple tool designed to concatenate and write file(s) to your screen, which is known as standard output (stdout). It is part of the GNU Core Utils released under the GPLv3+ license. You can expect to find it in just about any Linux distribution or other Unix operating environment, such as FreeBSD or Solaris. The simplest use of cat is to show the contents of a file. Here is an example with a file named hello.world:

ls

hello.world

cat hello.world

Hello World!



$

The most common way I use the cat command is for viewing configuration files, such as those in the /etcdirectory.

Read more at OpenSource.com