Problems with rsync with dirctories with spaces in the name

Wayne Davison wayned at samba.org
Fri Jan 9 17:17:24 GMT 2004


On Fri, Jan 09, 2004 at 07:32:15AM -0800, jw schultz wrote:
> Hmm, just a thought here for the other developers: Perhaps
> rsync should check the source/dest portions of remote
> argument list for whitespace and if there but no quotes or
> backslashes insert backslashes or surrounding quotes.

One problem affects only the source (changing the destination handling
to treat spaces better should be fine):

People actively use the space-breaking properties of the shell to fetch
multiple files:

    rsync -av remote:"p1/one p2/two p3/three" dest/

I've always thought that this was not the best way to have handled this
(since it treats file names with spaces in them inconsistently from
other files), but it's what we currently have.  (Aside: these days I'd
recommend using files-from for pulling multiple files in a consistent
manner that honors spaces.)

> Having a test for quotes or backslashes would provide backwards
> compatability.

Seems reasonable.  The case of people having backslashes in filesnames
prior to spaces seems small enough that we can ask them to add extra
backslashes (like they would have to do now).

..wayne..


More information about the rsync mailing list