From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PY0yp-00058p-Ab for garchives@archives.gentoo.org; Wed, 29 Dec 2010 18:42:35 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 74FF8E06D9; Wed, 29 Dec 2010 18:41:02 +0000 (UTC) Received: from mx.virtyou.com (mx.virtyou.com [94.23.166.77]) by pigeon.gentoo.org (Postfix) with ESMTP id 3902EE06D9 for ; Wed, 29 Dec 2010 18:41:02 +0000 (UTC) Received: from weird.localnet (static-87-79-89-40.netcologne.de [87.79.89.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.virtyou.com (Postfix) with ESMTPSA id 9979A39A018 for ; Wed, 29 Dec 2010 19:41:01 +0100 (CET) From: Alex Schuster To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Best way to copy /* ? Date: Wed, 29 Dec 2010 19:41:00 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.36-ck-r3; KDE/4.5.4; x86_64; ; ) References: <201012291850.08875.wonko@wonkology.org> <201012291830.03500.peter@humphrey.ukfsn.org> In-Reply-To: <201012291830.03500.peter@humphrey.ukfsn.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201012291941.00611.wonko@wonkology.org> X-Archives-Salt: adc1415c-cede-40a1-a378-23d695efa8f4 X-Archives-Hash: c25b3dac0475840b48b1a70a4c41702d Peter Humphrey writes: > On Wednesday 29 December 2010 17:50:08 Alex Schuster wrote: > > What Maciej said. Or, for greater security when the destination is > > outside the LAN: > > > > cd [source] & tar xpf - . | ssh [user]@[host] 'cd [dest] && tar xpf > > -' > > That's what I was looking for - a single command I can run on the source > machine. Thanks Alex. > > Just one more thing - what if I only want to store the tar of the source > directory as an archive on the remote machine? In that case I'd want to > stream the incoming data into a file instead of untarring it. Replace the tar by cat, and redirect into a file: cd [source] & tar xpf - . | ssh [user]@[host] 'cat > [dest]/[name].tar' Wonko