Cheatsheet Pages / curl Cheatsheet

How to save curl output to a file — -o vs -O

The response should land on disk — under a name you choose, or under the name the URL already has.

curl -o page.html https://example.com
curl -O https://example.com/files/report.pdf   # saves as report.pdf

Good to know

Lowercase -o takes your filename; uppercase -O reuses the last part of the URL.

curl Cheatsheet one-page card — commands that actually work
The full one-page card — curl Cheatsheet. Get the complete cheatsheet on GitHub