However, I was struggling to know how to upload one file and have it append to another e.g. perform the equivalent of "cat foo >> bar" which appends the contents of foo onto bar.
Thanks to this most useful blog, I now know how - don't use SCP, use SSH instead: -
How to append remote file with local file over ssh connection
cat local-source-file-name | ssh user@some.domain "cat >> remote-target-file-name"
How to append to local file from remote file over ssh connection
ssh user@some.domain "cat remote-source-file-name" >> local-target-file-name
No comments:
Post a Comment