syncing directories with whitespaces

Kevin Easton
Mon, 18 Mar 2002 13:18:56 -0000

> Hi,
>
> [Sorry for this very newbie-question but I really
> can't find this in the man-pages, faq or
> mailarchives.]
>
> How do I rsync directories that includes whitespaces?
>
> I like to do something like this but I get "No such
> file or directory":
>
> $ rsync -e ssh -av --delete myhost.org:"/ftp/my dir/"
> "/ftp-mirror/my dir/"

What is actually happening is that rsync is passing the directory you gave
it to another instance of rsync running on the other side.  So you need to have
quotes around it when it arrives at the other side, too - otherwise your
remote shell will interpret the spaces.  Try this:

rsync -e ssh -av --delete myhost.org:'"/ftp/my dir/"'
"/ftp-mirror/my dir/"

    - Kevin.

>
> Only solution to this as I can find is to create a
> symlink with no whitespaces on both sides and sync
> that one.
>
> Help please...
>
> /FM
>