Usage And Variation

  1. cat file1.txt file2.txt > file3.txt adds the contents of file1 and file2 and writes it all out to file3

What is the CAT command?

Short for concatenate, this command reads data from files and displays their contents. It can also be used to copy text files into a new document and combine contents of two text files.

Examples:

Screenshot

In the example above, the user is first displaying contents of the files "findfile" and "touchfile" separately. When the user specifies more than one file name, the two files are displayed one after another in the same output.

Try it: