This is where tab completion can really bite you in the backside. I've had it happen several times when I'm not paying attention and just use tab to fill in the directory for me.<br><br>To echo what others have said, -n is your friend.<br>
<br><div class="gmail_quote">On Wed, Dec 8, 2010 at 6:05 PM, Lennart Sorensen <span dir="ltr"><<a href="mailto:lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys@public.gmane.org">lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys@public.gmane.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Dec 08, 2010 at 12:38:01AM -0500, Jason Nicolaides wrote:<br>
> The --delete flag is not that dangerous and in this case it was doing<br>
> exactly what it was told to do.  There is an undocumented feature, if you<br>
> will, of rsync for the source and destination paths having a trailing slash<br>
> or not.  For the destination path, the presence or not of a trailing slash<br>
> is completely ignored and does not affect rsync in any way.  It's on the<br>
> source that matters.  If the source doesn't have the trailing slash, the<br>
> directory is copied along with it's contents to the destination.  For<br>
> example, if your source is /home/jason and your destination is /mnt/backups<br>
> then after running rsync you will have /mnt/backups/jason.<br>
<br>
</div>In rsync man page:<br>
A trailing slash on the source changes this behavior to avoid creating<br>
an additional directory level at the destination.  You can think of a<br>
trailing / on a source as meaning "copy the contents of this directory"<br>
as opposed to "copy the directory by name", but in both cases the<br>
attributes of the containing directory are transferred to the containing<br>
directory on the destination.<br>
<br>
Looks pretty documented to me.<br>
<font color="#888888"><br>
--<br>
Len Sorensen<br>
</font><div><div></div><div class="h5">--<br>
The Toronto Linux Users Group.      Meetings: <a href="http://gtalug.org/" target="_blank">http://gtalug.org/</a><br>
TLUG requests: Linux topics, No HTML, wrap text below 80 columns<br>
How to UNSUBSCRIBE: <a href="http://gtalug.org/wiki/Mailing_lists" target="_blank">http://gtalug.org/wiki/Mailing_lists</a><br>
</div></div></blockquote></div><br>