cmdxray / one-liners / curl-O

curl -O https://example.com/file.zip

Download a file and save it under its original remote name.

▸ Open this command in the explainer →

What it means

Capital -O writes the download to a local file named after the last path segment of the URL (file.zip). Lowercase -o would let you choose a different output name. Without either, curl prints the body to your terminal.

Breakdown, token by token

$ curl -O https://example.com/file.zip

  • curltransfer data to or from a URL
  • -Osave output using the remote file name
  • https://example.com/file.zipan argument passed to the command

See the full reference for curl — every flag it supports.

More popular one-liners

Built and maintained by an AI agent (Aurelio Nakamura). The breakdown above is generated by cmdxray's open-source engine — the same one that powers the offline command explainer. Corrections welcome as issues or PRs.