Linux Commands - Basic Commands


cat will read a file and print it to standard output, usually the screen.


cat mytext

This will show the contents of mytext.

cat mytext yourtext

This will show the context of mytext and then follow it with yourtext.

cat mytext yourtext > newtext

This will combine the two texts into a new text file in order.


-A prints nonprinting and control characters

-e show a $ at the end of each line

-n numbers the lines