From owner-freebsd-questions Fri May 10 17:23:50 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 9559C37B403 for ; Fri, 10 May 2002 17:23:46 -0700 (PDT) Received: from hades.hell.gr (patr530-a063.otenet.gr [212.205.215.63]) by mailsrv.otenet.gr (8.12.3/8.12.3) with ESMTP id g4B0NaG1023772; Sat, 11 May 2002 03:23:39 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.3/8.12.3) with ESMTP id g4B0Nag5008730; Sat, 11 May 2002 03:23:36 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from charon@localhost) by hades.hell.gr (8.12.3/8.12.2/Submit) id g4B0NKhK008728; Sat, 11 May 2002 03:23:20 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 11 May 2002 03:23:20 +0300 From: Giorgos Keramidas To: Odhiambo Washington Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Help get reverse of this command Message-ID: <20020511002320.GA8672@hades.hell.gr> References: <20020504103049.GA30802@ns2.wananchi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020504103049.GA30802@ns2.wananchi.com> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-05-04 13:30, Odhiambo Washington wrote: > I can do this > > tar $some_args some_dirs | /usr/bin/ssh alligator '(cd /home/wash/Administration/Backups; cat > filename.tgz)' > > this pipes the output to the remote host... > > > How do I 'backpipe' in such a situation, i.e. login to remote host, tar up some_dir and put it here (on > the host I am logged in)? > > My question is not clear, yes? > > On hostB I have a directory which when tarred up will be 20MB in size. I have only 5MB free > space on hostB so what I want to do is ssh to hostB tar up that directory but redirect the > output of tar into hostA where I am logged in. That is what I mean by backpiping ;-) You can always use something like: ssh -l username host 'cd /some/path ; tar flags directory' | tar tvf - The second tar can be replaced with any command that can run locally. Absurdly long commands are no problem either: ( cd /tmp ; ssh -l keramida freefall 'tar cvf - public_html | gzip -9c -' \ gzip -9c | tar xvf - ) - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message