scp

Jim Knoble jmknoble at pobox.com
Fri Oct 18 10:34:48 EST 2002


Circa 2002-10-16 13:20:32 -0500 dixit Ladner, Eric (Eric.Ladner):

: True, true, but that's another piece of software I have to install
: and maintain just to have that functionality enabled for the 
: infrequent times that I do need to copy a tree from one server to
: another.
: 
: Actually, my current workaround is like this to copy a tree:
: 
: cd /some/tree; tar -cf - . | ssh remote_host "cd /some/other/tree; tar -xvf
: -"
: 
: It works like a champ, but scp with link copy would be cleaner:
: 
: scp -rp /some/tree/* remote_host:/some/other/tree
: 
: Which is more intuitive?

Actually, to many folks at all used to the Unix environment, the tar
pipe is significantly more obvious and "intuitive" (i.e., conforming to
their prior experience).  It used to be that the tar pipe was necessary
to copy or move directory trees even on a local system while preserving
symlinks and whatnot.  It's only recently that folks seem to have
forgotten how to do that.

By the way, what you probably want on the extracting end is:

  tar -xvpf -

in order to to preserve permissions.  If using GNU tar, you may also
also want '--same-owner' and '--sparse'.

-- 
jim knoble  |  jmknoble at pobox.com  |  http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
"I am non-refutable."  --Enik the Altrusian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 262 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20021017/64ec4b9d/attachment.bin 


More information about the openssh-unix-dev mailing list