This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The -O option of curl under cygwin.

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

	  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

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]