Colon
Par jd le mardi, octobre 10 2006, 19:36 - Free Software - Lien permanent
Dear Lazy Web,
How the hell can you scp/rsync a file with a : (colon) in it ?!?!?!
Aller au contenu | Aller au menu | Aller à la recherche
Par jd le mardi, octobre 10 2006, 19:36 - Free Software - Lien permanent
Dear Lazy Web,
How the hell can you scp/rsync a file with a : (colon) in it ?!?!?!
Commentaires
scp ./foo:bar user@host:
I created a file named file:1:
touch "file:1" To scp it from one server to another one needs to escape the :
i.e.
scp server1:/tmp/file\:1 /tmp/
After retesting looks like I didn't need to escape the colon!
The trick is to know where you're using the : character. If it's a remote file there's no problem and no need of escaping since you preceded already by an :. Example:
scp me@my.machine.com:a:a.txt .
If it's a local file you just have to say it explicitly by expressing a path. Example:
scp ./a:a.txt me@my.machine.com:
This works for me at least on OpenSSH 4.3.
history 1 | grep scp | grep ::
When playing around with the new debtags cloud interface, I ran into exactly this problem. My second try worked.