LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   scp file name with colon in it (https://www.linuxquestions.org/questions/linux-newbie-8/scp-file-name-with-colon-in-it-581847/)

tuxstar 09-03-2007 08:05 AM

scp file name with colon in it
 
I'm trying to scp a file named test:File.txt from one server to another. I keep getting the same error
File.txt: No such file or directory

The commands I've tried are
scp test\:File.txt root@machine:/tmp/
scp "test:File.txt" root@machine:/tmp/
scp 'test:File.txt' root@machine:/tmp/

I know the escape character is \ but this does not work. I can rename the file and then scp it, but how would I scp the file if the name had a colon in it.

colucix 09-03-2007 08:28 AM

Why not the following, trying to force scp to interpret the name as a file in the current directory?!
Code:

scp ./test:File.txt root@machine:/tmp/

tuxstar 09-03-2007 08:38 AM

Thanks, that worked perfectly.


All times are GMT -5. The time now is 03:06 AM.