Now I am having two files. File A and file B. Both files contain of information inside. I am having issues on how to copy the information in file A to file B without removing or overwriting the information in file B by using Linux command prompt.
File A:
1
2
3
File B:
A
B
What i want to achieve by using Linux prompt: File B:
A
B
1
2
3
Please advice me on how should I do it, thank you!
How about concatenating the files?
Like
The
catcommand will display the contents of fileA, but the redirection operator (>>) will cause the output to be appended to the end of fileB.Or if you don't want to change the contents of either file, you can use the
catcommand to create a third file (catactually stands for conCATenate):The above command will display the contents of file
Afollowed by the contents of fileB, with the output redirected (with>) to create a new fileCwhich will contain the contents of fileAandB.