LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-03-2007, 09:05 AM   #1
tuxstar
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Rep: Reputation: 0
Question 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.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-03-2007, 09:28 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
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/
 
2 members found this post helpful.
Old 09-03-2007, 09:38 AM   #3
tuxstar
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks, that worked perfectly.
 
  


Reply

Tags
scp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP: No such file or directory...but its there!? Baix Linux - Newbie 20 07-28-2012 03:42 PM
Trying to scp a file, why do I get this? EnVoy Linux - Newbie 2 06-28-2007 07:36 PM
Help on editing perl script to avoid file names with colon (:) stelmed Programming 2 12-12-2006 06:17 PM
SCP Copy File SSH petenyce Linux - Wireless Networking 2 10-05-2005 04:11 PM
SCP ??? where did the file go ?????? lub0 Linux - Security 3 10-07-2003 06:19 PM


All times are GMT -5. The time now is 04:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration