Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Best way to copy /* ?
Date: Wed, 29 Dec 2010 18:42:35
Message-Id: 201012291941.00611.wonko@wonkology.org
In Reply to: Re: [gentoo-user] Best way to copy /* ? by Peter Humphrey
1 Peter Humphrey writes:
2
3 > On Wednesday 29 December 2010 17:50:08 Alex Schuster wrote:
4 > > What Maciej said. Or, for greater security when the destination is
5 > > outside the LAN:
6 > >
7 > > cd [source] & tar xpf - . | ssh [user]@[host] 'cd [dest] && tar xpf
8 > > -'
9 >
10 > That's what I was looking for - a single command I can run on the source
11 > machine. Thanks Alex.
12 >
13 > Just one more thing - what if I only want to store the tar of the source
14 > directory as an archive on the remote machine? In that case I'd want to
15 > stream the incoming data into a file instead of untarring it.
16
17 Replace the tar by cat, and redirect into a file:
18
19 cd [source] & tar xpf - . | ssh [user]@[host] 'cat > [dest]/[name].tar'
20
21 Wonko

Replies

Subject Author
Re: [gentoo-user] Best way to copy /* ? Mick <michaelkintzios@×××××.com>