How do I use curl save to file to download and store content directly?

14 Replies, 778 Views

Curl save to file is awesome, but don’t sleep on `-J` flag! It lets you save the file with the name from the `Content-Disposition` header. Super useful when the server suggests a filename.

Example:
`curl -OJ https://example.com/download`

Also, if you’re into scripting, you can pipe curl output to other commands. Like:
`curl https://example.com/data | jq . > output.json`

Messages In This Thread



Users browsing this thread: 1 Guest(s)