I am trying to copy a file that has colons and periods, e.g., with:
scp "test.json-2014-08-07T11:17:58.662378" remote:tmp/
scp test.json-2014-08-07T11\:17\:58.662378 remote:tmp/
and combinations with file:
scp "file:///home/.../test.json-2014-08-07T11:17:58.662378" remote:tmp/
My guess is that scp tries to interprete parts of the file as a server and/or port number. How do I avoid that?
If I rename the file to test.json then scp test.json remote:tmp/ works ok, but not even scp test*62378 remote:tmp/works.
*), don't work. It is done in shell, so exactly the same text (argument) will be passed toscp. You need to change the text (argument) that is passed toscp. (see answer below, for what to change text argument to.):is an illegal filename character on OSX, so if you ever need to transfer these files there it's something to keep in mind.scp -- -1.JvSbrpchxuk.png [email protected]:/tmp