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/

As an Amazon Associate I earn from qualifying purchases. Read our Privacy Policy for more info.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.