How to download a file using curl

后端 未结 4 1755
余生分开走
余生分开走 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

    The -o --output option means curl writes output to file you specicify instead of stdout, you put the url after -o, so the curl thinks the url is a file to write and no url specified. You need a file name after the -o, then the url. Since the url is HTTPS-based, maybe you also need the -k option:

    curl -o ./filename -k https://github.com/jdfwarrior/Workflows.git
    

    And wget is not available by default on OS X.

提交回复
热议问题