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
cat
command 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
cat
command to create a third file (cat
actually stands for conCATenate):The above command will display the contents of file
A
followed by the contents of fileB
, with the output redirected (with>
) to create a new fileC
which will contain the contents of fileA
andB
.