LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack 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.
 
Old 09-03-2007, 08:28 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: OpenSUSE 12.1 CentOS 6.2
Posts: 9,010

Rep: Reputation: 1352Reputation: 1352Reputation: 1352Reputation: 1352Reputation: 1352Reputation: 1352Reputation: 1352Reputation: 1352Reputation: 1352Reputation: 1352
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/
 
1 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


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
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: No such file or directory...but its there!? Baix Linux - Newbie 19 02-01-2005 08:47 AM
SCP ??? where did the file go ?????? lub0 Linux - Security 3 10-07-2003 05:19 PM


All times are GMT -5. The time now is 04:16 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
Open Source Consulting | Domain Registration