Prepend data from one file to another

Sukesh picture Sukesh · Jun 28, 2012 · Viewed 7k times · Source

How do I prepend the data from file1.txt to file2.txt?

Answer

Justin.Wood picture Justin.Wood · Jun 28, 2012

The following command will take the two files and merge them into one

cat file1.txt file2.txt > file3.txt; mv file3.txt file2.txt