The “cat” command

Use this command to concatenate a file or files and display the result; or concatenate multiple files into a single output file.

Concatenate one or more files

Include one or more instances of the <FILE> parameter, setting each to the complete path and file name to the desired file for concatenation. Resulting concatenated files will be housed in the current active directory.

cat <OPTION> <FILE>...

Example

cat /123456/test/file01 /123456/test/file02

Concatenate multiple files into a single output file

If you need to process several files as one and save the results of such processing to a single output file, this command can be applied. Include one or more instances of the <FILE> variable, setting each to the complete path and filename for the desired file, and set the <OUTPUTFILE> variable to a desired path and filename for the resulting concatenated output file.

Important: With this instance of the command, you must use the right angle bracket (>) within the syntax. The final path/file to be concatenated must be followed by a single whitespace, the >, a second whitespace, and finally the filename of the concatenated file. All other instances of < > in the example that follows indicate a variable value.
cat <OPTION> <FILE1> <FILE2> <FILE3>... > <OUTPUTFILE>

Example

Here, three files are concatenated into a single output file:

cat /123456/test/file01 /123456/test/file02 /123456/test/file03 >
/123456/completed/output_file

Available options

Note: The <OPTION> variable can be incorporated, using the following:
Option Description
-h, --help Display help information for this command.