Categories
Command Line Quick Tips Quick Tips

cURL download file command

< 1 min read

I always hit a mental block on the cURL command for downloading and saving a file 😬

curl -o file.zip https://website.com/file.zip

The -o option tells it to write the response body to a file, the positional argument is the URL to the thing you want to download.

command

@btisdall shared a related tip:

Or -O with no argument if you just want the filename to be the "head" of the URL.

Original tweet