scp

Ladner, Eric (Eric.Ladner) Eric.Ladner at ChevronTexaco.com
Thu Oct 17 04:20:32 EST 2002


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?

E

-----Original Message-----
From: Jim Knoble [mailto:jmknoble at pobox.com]
Sent: Monday, October 14, 2002 3:26 PM
To: openssh-unix-dev at mindrot.org
Subject: Re: scp


Circa 2002-10-14 14:25:22 -0500 dixit Ladner, Eric (Eric.Ladner):

: Or to copy sym links as sym links and not the file they point to.

You must mean rsync ( http://rsync.samba.org/ ).  'rsync -l' copies
symlinks as symlinks, while 'rsync -a' copies device files, owners,
permissions, and datestamps in addition. 

: -----Original Message-----
: From: Douglas Boldt [mailto:doug at endai.com]
: Sent: Saturday, October 12, 2002 3:52 PM
: To: openssh-unix-dev at mindrot.org
: Subject: scp
: 
: I would absolutely love a flag in scp to ignore sym-links.

Douglas, you'll probably get more mileage out of rsync than scp for
doing this.  If you merely don't want to copy symlinks because they
take too much time to copy, then 'rsync -a' will handle that
automatically; it doesn't copy something it doesn't have to.

If, instead, you wish to exclude symlinks that point outside of the
directory tree you're copying, use rsync's '--safe-links' option.

If you really don't want to copy any symlinks, you'll need to wrap some
scripting around 'find <dir> -type l' together with
'rsync -a --exclude-from=<file>'.

Good luck to both of you.

-- 
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




More information about the openssh-unix-dev mailing list