2000-12-08-05:24:50 John Horne:
> On 07-Dec-00 at 19:53:51 Dave Dykstra wrote:
> > Having a slash at the end of the source specification removes the base
> > name of the source from the destination filename.
> > 
> Hmm, easy when you know how eh? :-)

"It says there on the list of ingredients, right before Monosodium
 Glutimate".
"It should have a big label on the outside of the box saying
    ``Warning! Lark's Vomit!''"
        -- paraphrased, from memory, from a Monty Python sketch

Wow. I somehow never read the whole rsync man page thoroughly, there
was just too much of it. So armed with this tidbit, I searched for
"trailing slash", and sure enough, it says:

        a trailing slash on the source changes this behavior to
        transfer all files from the directory src/bar on the
        machine foo into the /data/tmp/. A trailing / on a source
        name means "copy the contents of this directory". Without
        a trailing slash it means "copy the directory". This
        difference becomes particularly important when using the
        --delete option.

Boy, does it ever. It was my failure to pick this up that allowed me
to repeatedly mow down whole tracts of files until I finally got
into the habit of _always_ making sure the dst dir exists before
starting a recursive copy, then sending "src/." into "dst/", a
neurotic excess borne of pure terror:-).

At the risk of being _really_ heretical, may I propose that this
does not constitute a great user interface, as most folks are
accustomed to trailing slash making no difference --- especially
since filename completion typically tacks one on, while wildcarding
typically doesn't?

-Bennett

PGP signature

Reply via email to