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 [us...@[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 [us...@[host] 'cat > [dest]/[name].tar' Wonko