Skip to content

Instantly share code, notes, and snippets.

@153957
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 153957/5150d7cdcdb3dd24a45d to your computer and use it in GitHub Desktop.
Save 153957/5150d7cdcdb3dd24a45d to your computer and use it in GitHub Desktop.
scp or rsync a remote file or path with spaces

Escape twice, once using quotes and once using backslashes

Use:

scp [user]@[server]:"[filepath]" [destination]

Example:

scp fred@server.me:"/Volumes/disk/file\ with\ space\ \(and\ specials\)" Here_please/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment