LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 08: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, 08:28 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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, 08:38 AM   #3
tuxstar
LQ Newbie
 
Registered: Jan 2007
Posts: 4

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


Reply

Tags
scp



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 02:42 PM
Trying to scp a file, why do I get this? EnVoy Linux - Newbie 2 06-28-2007 06:36 PM
Help on editing perl script to avoid file names with colon (:) stelmed Programming 2 12-12-2006 05:17 PM
SCP Copy File SSH petenyce Linux - Wireless Networking 2 10-05-2005 03:11 PM
SCP ??? where did the file go ?????? lub0 Linux - Security 3 10-07-2003 05:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration