From owner-freebsd-questions@FreeBSD.ORG Sat Oct 13 10:10:26 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E75F16A417 for ; Sat, 13 Oct 2007 10:10:26 +0000 (UTC) (envelope-from svein.h@lvor.halvorsen.cc) Received: from signal.itea.ntnu.no (signal.itea.ntnu.no [129.241.190.231]) by mx1.freebsd.org (Postfix) with ESMTP id 57B7D13C4A6 for ; Sat, 13 Oct 2007 10:10:25 +0000 (UTC) (envelope-from svein.h@lvor.halvorsen.cc) Received: from localhost (localhost [127.0.0.1]) by signal.itea.ntnu.no (Postfix) with ESMTP id 4900B342FB for ; Sat, 13 Oct 2007 12:10:22 +0200 (CEST) Received: from maren.thelosingend.net (maren.math.ntnu.no [129.241.211.48]) by signal.itea.ntnu.no (Postfix) with SMTP for ; Sat, 13 Oct 2007 12:10:21 +0200 (CEST) Received: (qmail 68487 invoked by uid 88); 13 Oct 2007 12:10:21 +0200 Received: from maren.math.ntnu.no (HELO weld.ej2.thelosingend.net) (129.241.211.48) by maren.thelosingend.net (qpsmtpd/0.31.1) with ESMTP; Sat, 13 Oct 2007 12:10:21 +0200 Message-ID: <47109910.7040209@lvor.halvorsen.cc> Date: Sat, 13 Oct 2007 12:08:16 +0200 From: Svein Halvor Halvorsen User-Agent: Thunderbird 2.0.0.6 (X11/20070923) MIME-Version: 1.0 To: Andrew Pantyukhin References: <20071012143730.GC3881@kobe.laptop> <687623.75032.qm@web45604.mail.sp1.yahoo.com> <20071012235953.GB1554@amilo.cenkes.org> In-Reply-To: <20071012235953.GB1554@amilo.cenkes.org> X-Enigmail-Version: 0.95.0 OpenPGP: id=9198BB40; url=mailto:pgpkey@svein.halvorsen.cc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Scanned: with sophos and spamassassin at mailgw.ntnu.no. Cc: Giorgos Keramidas , Juri Mianovich , freebsd-questions@freebsd.org Subject: Re: help with text-append over SSH ? - dd: unknown operand >> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Oct 2007 10:10:26 -0000 >>>> 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@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