15 Oct 2012, 07:47

Escaping Filenames with Whitespaces for rsync


If you need to sync from a source path containing whitespaces you’ll need to escape those for the remote shell as well as for the local shell, so your command may look like this:

  rsync -ae ssh 'user@host.tld:/path/with\ some/gaps/' '/another/one with/ a gap/'

Don’t escape the whitespaces on the local side twice or you’ll end up with weired filenames!