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.) – ctrl-alt-delor Aug 07 '14 at 10:05:
is an illegal filename character on OSX, so if you ever need to transfer these files there it's something to keep in mind. – Daenyth Aug 07 '14 at 16:32scp -- -1.JvSbrpchxuk.png user@example.com:/tmp
– Shane Rowatt Mar 04 '18 at 05:05