How to scp with spaces in the filename

If you have spaces in your file name then you must use both quotes and escape the spaces:

scp example.com:~/some/file/'with\ spaces' .
scp example.com:~/some/file/"with\ spaces" .

Or use a combo of single and double quotes:

scp 'example.com:~/some/file/"with spaces"' .

Reference: How do I scp a file with spaces in the filename?

Last modified: 03/09/2014 Tags:

Related Pages

Other pages possibly of interest:

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top