From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Running 'curl' with '-o' option failed with error "curl: (23) Failed writing body (0 != 720)"
Date: Fri, 21 Jun 2019 20:36:00 -0000 [thread overview]
Message-ID: <640e0c54-8231-a05d-e145-eb2dd1b01a3b@SystematicSw.ab.ca> (raw)
In-Reply-To: <20190621074049.8D3DF4140097@webmail.sinamail.sina.com.cn>
On 2019-06-21 01:40, Ma Hao wrote:
> On 2019å¹´06æ21æ¥ 15ç¹37å, Csaba Raduly wrote:
>> On Fri, Jun 21, 2019 at 9:28 AM Ma Hao wrote:
>>> I was running into the problem when I tried to download spring:
>>> $ curl https://codeload.github.com/spring-projects/spring-framework/zip/master -o /home/cdmahao/
>> You told curl to write the download to a file named /home/cdmahao/
>> Unfortunately, there is already a directory named /home/cdmahao/, and
>> curl can't write a file to a directory.
>> You need to give the name of a file to -o
>> $ curl https://codeload.github.com/spring-projects/spring-framework/zip/master
>> -o /home/cdmahao/master.zip
>> curl works differently from wget. wget invents a filename based on the
>> URL. curl does not do that.
> Thanks for pointing that out.Appreciate your quick responding.
To make curl operate more like wget when downloading files, use curl -JOR where:
-O,--remote-name uses the trailing URL component as the filename to save;
-J,--remote-header-name works with -O,--remote-name to use the server
Content-Disposition header filename if available, instead of the trailing URL
component, as the filename to save;
-R,--remote-time is like wget -N,--timestamping and uses the remote file
modified time stamp if available;
--remote-name-all enables -O for all URLs specified in the command.
Note that curl will only download into the current directory and never
overwrites existing files, whereas wget supports -P,--directory-prefix=prefix,
and wget requires -nc,--no-clobber to suppress version suffixing the file names
of, or overwriting, existing files depending on other options specified.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2019-06-21 20:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 7:40 回复:Re: " Ma Hao
2019-06-21 20:36 ` Brian Inglis [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-06-21 7:27 Ma Hao
2019-06-21 7:37 ` Csaba Raduly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=640e0c54-8231-a05d-e145-eb2dd1b01a3b@SystematicSw.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).