How to download a file using curl

后端 未结 4 1753
余生分开走
余生分开走 2021-02-05 02:50

I\'m on mac OS X and can\'t figure out how to download a file from a URL via the command line. It\'s from a static page so I thought copying the download link and then using

4条回答
  •  后悔当初
    2021-02-05 03:27

    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

提交回复
热议问题