All Articles

Downloading a File Using cURL

By default, cURL prints the file content on the console.

However, we can use the output flag to save it to a file:

curl https://example.com --output example.txt