Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Feb 2002 15:12:20 -0500
From:      parv <parv_@yahoo.com>
To:        Peter Brezny <peter@skyrunner.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: scp odd behavior
Message-ID:  <20020212201220.GD23041@moo.holy.cow>
In-Reply-To: <NEBBIGLHNDFEJMMIEGOOKEFEEIAA.peter@skyrunner.net>
References:  <NEBBIGLHNDFEJMMIEGOOKEFEEIAA.peter@skyrunner.net>

next in thread | previous in thread | raw e-mail | index | archive | help
in message <NEBBIGLHNDFEJMMIEGOOKEFEEIAA.peter@skyrunner.net>, 
wrote Peter Brezny thusly...
>
> 
> These two seemingly identical statements are giving different results.
> 
> the first scp command copies the data in the htdocs filder and puts it in
> the data directory
> the second scp command creates an htdocs director in the data directory.
> 
> scp -i /bkup/.ssh/identity -r -q user@host1.com:/usr/local/htdocs/
> /home/www/data/

> scp -i /bkup/.ssh/identity -r -q user@host2.com:/usr/local/htdocs/
> /home/www/data/
> 
> What have i missed?


do you correctly remember specifying the last "/" after "htdocs"?

i have not yet come across the problem as i always specify the last
"/" if i need only the contents of a directory copied.

it may or may not help further... rsync copies directory _and_ its
contents if the last slash is missing from the source path (on the
target).  otherwise it copies only the contents.  compare...

  rsync /tmp/ $HOME/tmp
  rsync /tmp $HOME/tmp


 - parv


-- 
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020212201220.GD23041>