Re: cygwin scp -r fails
- From: Darren Tucker <dtucker@xxxxxxxxxxxxxxxx>
- Date: 16 Feb 2006 11:42:11 GMT
On 2006-02-15, gregt@xxxxxxx <gregt@xxxxxxx> wrote:
I just installed the latest cygwin on my winXP laptop, and I am having
an issue using scp -r. I have tried it to multiple Linux and Solaris
boxes, so I am quite sure it's not on the receiving server side.
I am not sure if this is a bug or my problem; here's what I do:
scp -rv 2006* user@unix:.
Normally this would (and did on the older version) copy all of my 2006*
folders into the home directory of the "user" on the box "unix" - what
it does now, it creates empty folders.
When the command is ran with multiple v for verbosity (and I am using
folder windows for testing here) it still does not work, and here's the
debug info.
Has anyone seen it? Any ideas? I have found 2 similar postings on the
web, but no resolutions so far.
You're running it from the Cygwin shell or a Windows command prompt?
I suspect the latter.
On Unix, the shell expands wildcards but on Windows it's left up to
individual apps.
Up until 4.3p1, scp invoked ssh via the system(), which has the side
effect of expanding wildcards (since it uses the shell). 4.3p1 and
newer don't use system(), instead they construct an arglist and invoke
execl directly.
So, given a directory containing the files "foo" and "bar", on Unix
the command "scp * host:" will be expanded to "scp foo bar host:", scp
will open "foo" and "bar" in turn and send them to "host". On the
Windows CLI, the "*" won't be expanded and scp will try to open a
file literally called "*" which doesn't exist.
A workaround is to have the Cygwin shell expand the wildcards, eg:
c:\> sh -c "scp -r 2006* server:"
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
.
- Follow-Ups:
- Re: cygwin scp -r fails
- From: gregt
- Re: cygwin scp -r fails
- References:
- cygwin scp -r fails
- From: gregt
- cygwin scp -r fails
- Prev by Date: Re: sshd -i startup time
- Next by Date: Re: sshd -i startup time
- Previous by thread: cygwin scp -r fails
- Next by thread: Re: cygwin scp -r fails
- Index(es):
Relevant Pages
|
|