Those darned 'ol spaces in path/file names...

Wayne Davison wayned at
Thu Feb 10 08:13:44 GMT 2005

On Wed, Feb 09, 2005 at 12:42:08PM -0500, Clay Goss wrote:
> rsync -e ssh -vazP '/bob smith/sally smith/'
> <user>'/disk2/larry jones/bonnie jones/'

Word-splitting is caused by ssh executing the command using the remote
shell, so you typically need to not only escape spaces for your local
shell, but also for the remote shell.  I recommend getting it to work
with something simple, like ls:

  ssh -l user ls -la '/disk2/larry\ jones/bonnie\ jones/'

(Note the use of single quotes to get the backslash-escaped spaces over
to the remote shell.)

If that syntax works with straight ssh, it will also work with rsync.


More information about the rsync mailing list