Re: transferring directories with scp/rsync?
On Tue, Aug 12, 2008 at 06:54:30PM -0400, Zach Uram wrote:
> Hello,
>
> I have a directory /tmp/foo on my local host alpha.org and I wish to
> transfer it to user Bob (/home/bob) in dirctory $HOME/www/bar on
> remote host beta.org. How precisely can I do this 1) using scp 2)
> using rsync? I would like to see the commands for doing this with both
> methods. Ssh is running on both hosts.
'rsync -a' or 'scp -pr' . Trailing slashes may be very meaningful with
rsync. e.g. the following two have different results:
rsync dirname bob@beta.org:ww/bar
rsync dirname/ bob@beta.org:ww/bar
>
> Also what happens if the directory already existed on the remote host
> and has some of the same file names. Is it possible to use md5sums so
> that if a file is exact (same hash) it will prompt me and ask if I
> want to over-write it before it does?
If you want that, use rsync .
rsync is generally nicer than scp.
--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend
Reply to: