How to download a file using curl
curl -OL https://github.com/jdfwarrior/Workflows.git
-O
: This option used to write the output to a file which named like remote file we get. In this curl that file would be Workflows.git
.
-L
: This option used if the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place.
Ref: curl man page
The -o --output
option means curl writes output to the file you specify instead of stdout. Your mistake was putting the url after -o
, and so curl thought the url was a file to write to rate and hence that no url was specified. You need a file name after the -o
, then the url:
curl -o ./filename https://github.com/jdfwarrior/Workflows.git
And wget is not available by default on OS X.