How do I use Curl to download a file from the command line?

22 Replies, 1918 Views

Curl to download a file is a must-know for CLI users. Here’s a quick example: `curl -O https://example.com/file.zip`. That’ll save it in your current directory.

If you wanna save it somewhere else, use `-o` like `curl -o /path/to/save/file.zip [URL]`.

Also, if you’re downloading from a site that requires cookies, you can use `-b` to pass them. Super handy for scraping or private downloads.

Messages In This Thread



Users browsing this thread: 1 Guest(s)