Java Mailing List Archive

http://www.redhatconfig.com/

Home » Gentoo Linux »

Re: [gentoo-user] scp escape characters

Mike Edenfield

2008-04-16

Replies:

Author LoginPost Reply
Mick wrote:
> On 16/04/2008, dirk.heinrichs.ext@(protected):
>> Am Mittwoch, den 16.04.2008, 15:06 +0100 schrieb ext Mick:
>>
>>
>> > I was trying to scp a file which had spaces in its name; e.g.
>> >
>> > This\ is\ the\ name\ of\ it.txt
>
>> I tried it in my zsh, with TAB-completion (means: I typed "scp
>> remote_host:~/Fil<tab>"), and it gives this:
>>
>> scp remote_host:~/File\\\ with\\\ blanks
>>
>> And, of course, it copies the file just fine :-)
>
> Thanks guys, I'll try it next time. Just one thing: if the spaces
> need to be escaped at both ends, shouldn't it have just 2 \\, why are
> you showing it with 3 \\\ ?

It's escaping the first slash and the space:

'\\ \ ' -> '\ ' -> ' '

--K

--
gentoo-user@(protected)

©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.