
Eric.Ladner at ChevronTexaco
Oct 16, 2002, 10:20 AM
Post #6 of 9
(1667 views)
Permalink
|
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] Sent: Monday, October 14, 2002 3:26 PM To: openssh-unix-dev [at] mindrot 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] : Sent: Saturday, October 12, 2002 3:52 PM : To: openssh-unix-dev [at] mindrot : 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 | http://www.pobox.com/~jmknoble/ (GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491) "I am non-refutable." --Enik the Altrusian
|