Skip to main content

9.3) Redirection


Joining files together is not that much use if the results could only be printed to the screen. The real power of commands like β€˜cat’ and other commands is to have the output directed into a new file instead of the screen.

You can store the results of Unix commands (such as cat, ls, etc or any other command) by using the redirection command, β€˜>’, at the end of the cat command. This redirection is used extensively in Unix and can be used after almost all commands.

cat file1 file2 > file10