I use scp quite a bit. But I never had to use it with directory paths involving spaces until now (for some odd reason, I must be good at naming things as simple as possible, a good habit by the way).

In order to use spaces, as per this article, it is necessary to add three back slashes and the space.

At least that is the easiest way. Take a look at the linked article for more about it.

Here’s an example:

scp -rP 1234 allmycode/* [email protected]:/srv/Code\\ Version1/

Blog Logo

Mario Loria




Because gets old after a while.

Back to Overview