Last Updated: February 25, 2016
·
839
· maxime

How to scp with spaces

Useful tip to make an scp with spaces in directory/ies.

scp -r myfile root@dest:"/my/patch/with\\ spaces\\ in\\ dir"

You need to escape spaces two times, because the first one will be removed locally.