On Tue, Jan 03, 2012 at 03:50:32AM +0000, Hongyi Zhao wrote:
>On Mon, 02 Jan 2012 15:51:09 +0100, marco atzeri wrote:
>
>> I think you misunderstood the curl documentation,
>> in this way it works as you expect
>> 
>> curl -L
>> http://mirrors.ctan.org/systems/win32/miktex/setup/setup-2.9.4321.exe -o
>> ./miktex/setup/setup-2.9.4321.exe --create-dirs
>
>Thanks for your hints.  But you can see the following explanations in the 
>curl documentation:
>
>-O/--remote-name   Write output to a file named as the remote file

Right.  You still seem to be misinterpreting.  -O just creates a file
name in the current directory based on the name of the file on the
remote end.

The man page makes it clearer:

   -O, --remote-name
          Write output to a local file named like the remote file we  get.
          (Only  the file part of the remote file is used, the path is cut
          off.)

          The remote file name to use for saving  is  extracted  from  the
          given URL, nothing else.

          Consequentially,  the  file will be saved in the current working
          directory. If you want the file saved in a different  directory,
          make sure you change current working directory before you invoke
          curl with the --O, ---remote-name flag!

          You may use this option as many times as the number of URLs  you
          have.

--
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

Reply via email to