Re: [gentoo-user] scp escape characters
Mick wrote: On 16/04/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: 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"), 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@lists.gentoo.org mailing list
Re: [gentoo-user] scp escape characters
On 16/04/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 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"), 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 \\\ ? -- Regards, Mick -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] scp escape characters
On Wednesday 16 April 2008, 16:31, Etaoin Shrdlu wrote: > $ scp [EMAIL PROTECTED]:'/src/dir/This is the name of it.txt' /dst/dir Wrong (sorry). You need to both quote and escape spaces. -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] scp escape characters
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 > > But scp would fail each time saying that the name is ambiguous (or > something similar). I also tried enclosing the name in 'single', or > "double" quotes, but it wouldn't have any. > > What's the right way of doing this? > > Both boxen running gentoo and I was using bash shell. I tried it in my zsh, with TAB-completion (means: I typed "scp remote_host:~/Fil"), and it gives this: scp remote_host:~/File\\\ with\\\ blanks And, of course, it copies the file just fine :-) HTH... Dirk -- Dirk Heinrichs | Tel: +49 (0)162 234 3408 Configuration Manager | Fax: +49 (0)211 47068 111 Capgemini Deutschland | Mail: [EMAIL PROTECTED] Wanheimerstraße 68 | Web: http://www.capgemini.com D-40468 Düsseldorf | ICQ#: 110037733 GPG Public Key C2E467BB | Keyserver: www.keyserver.net signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: [gentoo-user] scp escape characters
On Wednesday 16 April 2008, 16:06, Mick wrote: > Hi All, > > I was trying to scp a file which had spaces in its name; e.g. > > This\ is\ the\ name\ of\ it.txt > > But scp would fail each time saying that the name is ambiguous (or > something similar). I also tried enclosing the name in 'single', or > "double" quotes, but it wouldn't have any. > > What's the right way of doing this? > > Both boxen running gentoo and I was using bash shell. Either $ scp 'This is the name of it.txt' [EMAIL PROTECTED]:/dst/dir or $ scp [EMAIL PROTECTED]:'/src/dir/This is the name of it.txt' /dst/dir depending on who's local and who's remote, should work. If neither does, post the actual command you were using. PS: Of course, if only that file begins with that characters, you can cheat and do $ scp [EMAIL PROTECTED]:/src/dir/This* /dst/dir -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] scp escape characters
Hello On Wed, Apr 16, 2008 at 03:06:05PM +0100, Mick wrote: > Hi All, > > I was trying to scp a file which had spaces in its name; e.g. > > This\ is\ the\ name\ of\ it.txt There is a problem ‒ it unescapes at both ends, so you need to double-escape it, like 'Filename\ with\ spaces' or Filename\\\ with\\\ spaces. Or, something like that (if I see it right). -- Support your right to arm bears!! Michal 'vorner' Vaner pgpl24Zn0rhPD.pgp Description: PGP signature