Linux

cat means to catenate. The cat commands attempts to catenate and print files

cat command Syntax

$ cat options file_name

Options Description
-b Number the non-blank output lines, starting at 1.

cat command examples

Prints the contents of the file, text.txt

 $ cat text.txt
This is the content of text.txt

Prints the contents of 2 files

$ cat text.txt text2.txt
This is the content of text.txt
This is the content of text2.txt

Overwrite / Create

This is how the catenate part works.

cat copies the content of the text.txt file and overwrites the contents of text2.txt

$ cat text.txt
This is a test
$ cat text.txt > text2.txt
$ cat text2.txt
This is a test

Append

You can also append the content of the first file to the second file

cat copies the content of the text.txt file and adds it to the content of text2.txt

$ cat text.txt
This is a testtest
$ cat text.txt >> text2.txt
$ cat text2.txt
This is a test
This is a testtest

Awesome, right?