From owner-freebsd-questions@FreeBSD.ORG Sun Oct 14 23:31:21 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 60D1216A41A for ; Sun, 14 Oct 2007 23:31:21 +0000 (UTC) (envelope-from j65nko@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.190]) by mx1.freebsd.org (Postfix) with ESMTP id B569B13C442 for ; Sun, 14 Oct 2007 23:31:18 +0000 (UTC) (envelope-from j65nko@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1148512rvb for ; Sun, 14 Oct 2007 16:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=AeBto/FsM0nuJCbtiQBcczygiNsS9pYrGbEqhk3Nwf4=; b=O/2sxu4QaN2NuO946yjgHXJC3i5L4iKUIfwCRe8g2gTBtC7PObT6rDu90B4n6oBz4vLqdCJEjxlQaVzTcmu4htpqmSjoD5lUE2HlO2lmg4TTI8/Em/1lrEPI3usuk9UfrJy8e/1SKtHT4Cp3QAbVvkKeGlIqv+vLAyZomEFULlk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Yk3NNNCsue5cyCjuDvgYqQT5YxZ5h5RxnqwVYhrwgBYAUrH66epkZQGt6cIJb7osgiMcEC80zusM8azYkYwiQY45wzZBOBCP39Li6qQtgbZmXfBoPL2y9HKq/sEzEZlClpAUPHOwjoYTSNyPal47CUzsizvnnKUUtskrhxn2BnU= Received: by 10.142.47.6 with SMTP id u6mr1342566wfu.1192404677328; Sun, 14 Oct 2007 16:31:17 -0700 (PDT) Received: by 10.143.12.12 with HTTP; Sun, 14 Oct 2007 16:31:17 -0700 (PDT) Message-ID: <19861fba0710141631x720891famdab607d2cae4e224@mail.gmail.com> Date: Mon, 15 Oct 2007 01:31:17 +0200 From: J65nko To: freebsd-questions@freebsd.org In-Reply-To: <20071014003326.P37825@wojtek.tensor.gdynia.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <561095.99967.qm@web45614.mail.sp1.yahoo.com> <20071014003326.P37825@wojtek.tensor.gdynia.pl> Subject: Re: help with text-append over SSH ? 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: Sun, 14 Oct 2007 23:31:21 -0000 On 10/14/07, Wojciech Puchar wrote: > > 'dd' command (among others) on the remote host ... so > > for instance, I can do things like this: > > > > ssh user@host rm -rf filename > > > > So, with all that in mind, how do I append the > > contents of a local file to a remote file, over SSH, > > using either 'echo' or 'dd' ? > > > > cat file |ssh user@host "cat >>file" > > replace cat with dd if you have to You can drop the first "cat" ssh user@host "cat >>file"