scp'ing files with spaces
Toby Fisher
toby at tjfisher.co.uk
Sat May 29 07:24:34 EDT 2004
On Sat, 29 May 2004, Igor Gueths wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all. I think I remember doing this once, however can't seem to get
> the syntax quite right. I am trying to scp 1 file from remote machine to
> local machine...What I am trying to copy is a directory tree on the
> remote machine and have it created within my current directory. The
> syntax I have been trying is something like:
> scp user at host:"/path/to/this is the file" .
> And yes I know I forgot the -r option above, however since I am typing
> this from a Putty terminal its more trouble than its worth to correct
> the message since I can't see what I am typing. Another quoting variant
> I trie dwas:
> scp "user at host:/path/to/this is the file" .
> Those quoting variants don't seem to be working...What scp ends up doing
> is streating the individual words that make up filename to be 2
> different files. Does anyone know the correct quoting variant to use so
> that scp will interpret it properly? Thanks!
Igor, you could always try escaping the spaces, like this:
scp user at remote-host:/path/this\ is\ the\ file $PWD.
If you wanted you could surround the filename in quotes, but this may not
be necessary.
HTH
--
Toby Fisher Email: toby at tjfisher.co.uk
Tel.: +44(0)1480 417272 Mobile: +44(0)7974 363239
ICQ: #61744808
More information about the Speakup
mailing list