How to capture Curl output to a file?

前端 未结 7 1074
小蘑菇
小蘑菇 2020-12-12 08:57

I have a text document that contains a bunch of URLs in this format:

URL = \"sitehere.com\"

What I\'m looking to do is to run curl -K

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 09:07

    For a single file you can use -O instead of -o filename to use the last segment of the URL path as the filename. Example:

    curl http://example.com/folder/big-file.iso -O
    

    will save the results to a new file named big-file.iso in the current folder. In this way it works similar to wget but allows you to specify other curl options that are not available when using wget.

提交回复
热议问题