Originally Posted by pamuzef
m a new user in linux. I wonder how I can copy some contents from a file in a different directory to another file in another directory without overwriting the previous contents in the new file I want to paste my contents in question.
First: next time create a new thread, this one is 3 years old and not really relevant to your question.
Mark1986 gave a partial answer, but not a complete one....
If you want to append the contents of a file to another file you indeed need a double redirect (>>). A single one will overwrite a double one will append. But you also need a command that tells the system what to do with a file (Mark1986's example won't work, due to this). cat
is a commonly used command to do so:
cat file1 >> /location/of/file2
Hope this helps.