From owner-freebsd-questions@FreeBSD.ORG Fri Oct 12 23:56:02 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 1DB4516A468 for ; Fri, 12 Oct 2007 23:56:02 +0000 (UTC) (envelope-from juri_mian@yahoo.com) Received: from n4.bullet.mail.re4.yahoo.com (n4.bullet.mail.re4.yahoo.com [206.190.56.23]) by mx1.freebsd.org (Postfix) with SMTP id CD54A13C4AA for ; Fri, 12 Oct 2007 23:56:01 +0000 (UTC) (envelope-from juri_mian@yahoo.com) Received: from [68.142.237.90] by n4.bullet.re4.yahoo.com with NNFMP; 12 Oct 2007 23:43:39 -0000 Received: from [66.196.101.132] by t6.bullet.re3.yahoo.com with NNFMP; 12 Oct 2007 23:43:39 -0000 Received: from [127.0.0.1] by rrr3.mail.re1.yahoo.com with NNFMP; 12 Oct 2007 23:43:39 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 396627.50554.bm@rrr3.mail.re1.yahoo.com Received: (qmail 75552 invoked by uid 60001); 12 Oct 2007 23:43:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=cDk/Oa0kdTh14DyQUqZ2JKN3ddmUlTlWY4eEud/YrdnXMxFBX7KVVT2QVO8Zd7abevJiCPAbHvbm/+DxNqrXhRT0sTexcpSdAymVnwsDi5XqZw1nu5IVwywuoTUTn0Rrsrhsibn4JD+47QmynXctNfhc+/LW7zkH+pi0iHTusmQ=; X-YMail-OSG: ni9zmkYVM1nyGrO35e4wC131SP3UHE7Uf1vlcmohNPERSsukA9AD_8ZJeRk7LCiXPWepyR5ITvSP7AJHugKqNNXvifpZnA3_s1sD Received: from [66.91.251.15] by web45604.mail.sp1.yahoo.com via HTTP; Fri, 12 Oct 2007 16:43:38 PDT Date: Fri, 12 Oct 2007 16:43:38 -0700 (PDT) From: Juri Mianovich To: Giorgos Keramidas In-Reply-To: <20071012143730.GC3881@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <687623.75032.qm@web45604.mail.sp1.yahoo.com> Cc: 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: Fri, 12 Oct 2007 23:56:02 -0000 --- Giorgos Keramidas wrote: > On 2007-10-11 16:49, Juri Mianovich > wrote: > > > > I have an account on a system where I cannot log > in over SSH, but I > > _can_ run a limited set of commands remotely, over > SSH. (I am in a > > jail of some sorts). > > > > I want to append the contents of a local text file > to the contents of > > a remote text file, over SSH. > > > > Normally, I would do this locally with: > > > > cat file1 >> file2 > > > > But again, file2 is remote, and I can't log in > there... I have access > > to the 'echo' command and the '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' ? > > Try running: > > cat file1 | ssh user@host "dd >> file2" Thank you - I do indeed need to use 'dd' because I don't have access to 'cat' in the chroot. However, when I use your example, I get this error: dd: unknown operand >> So I have something off a bit ... help ? ____________________________________________________________________________________ Check out the hottest 2008 models today at Yahoo! Autos. http://autos.yahoo.com/new_cars.html