Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Mar 2002 21:21:51 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Peter Leftwich <Hostmaster@Video2Video.Com>
Cc:        "Scott M. Nolde" <scott@smnolde.com>, FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: find | cpio syntax [use scp]
Message-ID:  <20020328192151.GA1528@hades.hell.gr>
In-Reply-To: <20020328005735.D97853-100000@earl-grey.cloud9.net>
References:  <20020327215404.A39175@smnolde.com> <20020328005735.D97853-100000@earl-grey.cloud9.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-03-28 00:58, Peter Leftwich wrote:
> On Wed, 27 Mar 2002, Scott M. Nolde wrote:
> > Greetings, Can anyone provide the syntax for remotely copying files
> > from a remote machine to another using find | cpio | ssh?  I'd like to
> > pipe the output over ssh to the local machine and store the file as a
> > gzip or tar.gz file archive.  Can anyone lend a hand?
>
> man scp
> (not that I've got it to work yet though, *grunts*!)

I customarily use ssh to copy files over ssh links:

    $ tar cvf - . | gzip -9c | ssh -T user@host 'mkdir foo ; cd foo ; gzip -cd | tar xf -'

The trick is to properly quote the ssh command, so that it's not executed
by the local shell :-)

Giorgos Keramidas                       FreeBSD Documentation Project
keramida@{freebsd.org,ceid.upatras.gr}  http://www.FreeBSD.org/docproj/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020328192151.GA1528>