[Linux-disciples] Rsync Question

Jason Smith pelican317 at mac.com
Sun Nov 21 19:30:38 EST 2004



On Nov 21, 2004, at 7:25 PM, Adam Rosi-Kessel wrote:

>> On Nov 21, 2004, at 6:00 PM, Jason Smith wrote:
>>> I have been using rsync to copy directories to and from a remote
>>> server. Am having one problem and perhaps I am not seeing the answer
>>> that should be right in front of me. If the directory at the source
>>> has a space in the name, rysnc is returning an error. For example,
> On Sun, Nov 21, 2004 at 06:23:34PM -0500, James Forrest wrote:
>> Try putting quotes around the path, as in:
>> rsync -vrP smith at domain.net:"/directory1/Multiple Word Directory" ~/
>>> rsync -vrP smith at domain.net:/directory1/Multiple\ Word\ Directory ~/
>
> Yeah, quotes should work, or you could do double, or maybe triple,
> escapes (i.e., slashes).  The problem is that you need the host on the
> other end to parse the escaped space, not the host on your end.
>
> By the time rsync establishes an ssh connection at domain.net to run
> rsync --server, the slashes are already gone, having been parsed by the
> command line interpreter (bash or tcsh or whatever) on your end.  If 
> you
> escape the slash itself, it will come across as a slash to the other
> side.
>
> In other words:
>
> rsync -vrP smith at domain.net:/directory1/Multiple\\\ Word\\\ Directory 
> ~/
>
> (untested)

This makes complete sense but is counterintuitive... I'll give it 
another try when I'm home.

Thanks Jamie and Adam...

J.



More information about the Linux-disciples mailing list