Home » Scripts » Rsync over SSH when directory names have spaces

Rsync over SSH when directory names have spaces

Rsync over SSH when directory names have spacesRsync is a great tool for syncing directories, here’s how to rsync over SSH when directory names have spaces!

Rsync over SSH when directory names have spaces

With some command line escape characters, like the backslash “\” and some quotation marks, you can rsync those pesky directories, folders or paths that include spaces in their names!

Sync Local folder with remote folder:

BASH
# rsync -avz Fringe\ Research\ Lab/ user@192.168.1.10:”/mnt/HD_a2/pub/library/Fringe\ Research\ Lab/”

 

Sync remote folder with local folder:

BASH
# rsync -avz user@192.168.1.10:”/mnt/HD_a2/pub/library/Fringe\ Research\ Lab/” Fringe\ Research\ Lab/

Was this helpful?
If you found my posts interesting, or I helped you figure something out, please consider tossing me a tiny gratuity for my time, research, to help offset the web hosting/development costs or to buy me a cup of coffee.

* This post may contain affiliate links. This means that I “might” receive a tiny amount of money, if you make a purchase using one of our links. It does not cost you anything extra, and helps us defray the costs of hosting and maintaining this site.

Leave a Reply