help with text-append over SSH ? - dd: unknown operand >>

Mel fbsd.questions at rachie.is-a-geek.net
Sat Oct 13 07:35:38 PDT 2007


On Saturday 13 October 2007 12:08:16 Svein Halvor Halvorsen wrote:
> >>>> I want to append the contents of a local text file
> >>>
> >>> to the contents of
> >>>
> >>>> a remote text file, over SSH.
>
> Andrew Pantyukhin wrote:
> > cat file1 | ssh user at host "dd -of file2"
>
> That will replace the contents of file2, not append it. Also it
> should be "dd of=file1". However, you can use "seek=n" to append,
> like this:
>
> cat file1 | ssh remote "dd of=file2 seek=n"
>
> ... where n is the length of file2

or better:
cat file1 | ssh remote "dd of=file2 conv=notrunc"

-- 
Mel


More information about the freebsd-questions mailing list