cURL download file is one of the fastest and most flexible ways to fetch online resources through the command line. You are in full control with cURL, whether you fetch images, documents, datasets, or binaries, including proxies to do so anonymously, geo-targeting, or automation.
While cURL comes preinstalled on many systems, if it’s missing on yours, you can follow the installation instructions in the guide to install it.
In this blog, we’ll walk you through how to use cURL to download files, customize filenames, handle redirects, and integrate proxies for enhanced security and access.
Basic cURL File Download
At its simplest, downloading a file with cURL requires only one flag:
curl -O https://example.com/file.pdf
- -O saves the files using their original name from the URL.
- The downloaded files will appear in your current directory.
If you want to rename the file while downloading, use -o:
curl -o custom_name.pdf https://example.com/file.pdf
Remember: You have to replace the URL of the website you want to scrape data from.

Following Redirects
Some URLs don’t point directly to a file; instead, they redirect. To be sure you get the final resource, add the -L flag:
curl -LO https://short.link/to/file.zip
- -L: Follows HTTP 3xx redirects.
- -O: Keeps the original filename after redirection.
Download Through a Proxy
To keep your downloads anonymous or bypass regional restrictions, Proxying.io offers reliable residential and datacenter proxies.
Here’s how to use a Proxying.io HTTP proxy with cURL:
curl -x http://user:password@proxy.proxying.io:6000 -O https://example.com/file.zip
For SOCKS5:
curl --socks5 user:password@proxy.proxying.io:1080 -O https://example.com/file.zip
This downloads the file through a proxy network, ideal for bulk downloads, rotating IPs, or spoofing your geographic location.
Remember: You have to replace the URL of the website you want to scrape data from.
Downloading Multiple Files
You can download several files at once using brace expansion or by listing multiple URLs.:
curl -O https://example.com/file1.csv -O https://example.com/file2.csv
Or using brace ranges:
curl -O https://example.com/file{1..3}.jpg
This saves file1.jpg, file2.jpg and file3.jpg.
Remember: You have to replace the URL of the website you want to scrape data from.
Set Timeouts and Rate Limits
To control resources during downloads:
--max-time
: Set a time limit for the entire operation.--limit-rate
: Limits download speed to avoid bandwidth spikes.
curl --limit-rate 500k --max-time 60 -O https://example.com/file.mp4
cURL Downloading Files Requiring Authentication
If the server requires authentication (like FTP or API endpoints), add your credentials with the --user
flag:
curl --user username:password -O https://secure.example.com/file.csv
Use a proxy and an authenticated request together:
curl -x http://user:pwd@proxy.proxying.io:6000 --user apiuser:apipass -O https://secure.example.com/data.json
Make Downloads Silent (or Not)
Need to suppress terminal output. Use:
- -s: Silent mode (no progress meter or messages).
- -#: Shows a simple progress bar instead of verbose stats.
curl -s# -O https://example.com/bigfile.iso
Debug and Inspect Requests
Use -v and --verbose
to use headers, status codes, and cURL behavior in detail:
curl -v -O https://example.com/resource.csv
Key cURL Flags for File Downloads
Option | Description |
-O | Save file with original name |
-o filename | Save file with custom name |
-L | Follow redirects |
-x | Use HTTP proxy |
--scoks5 | Use SOCKS5 proxy |
--user | Send HTTP/FTP basic auth credentials |
--limit-rate | Throttle download speed |
--max-time | Timeout for the whole operation (in seconds) |
-s/-# | Silent or progress-only mode |
-v | Verbose output for debugging |
cURL with Proxies
cURL is fast, scriptable, and commonly built into most systems. Using proxies, it becomes a powerful tool for secure, automated, and location-aware file downloads; all from a single terminal command.
Conclusion
Downloading files with cURL is a quick and efficient way to retrieve content from the web, and pairing it with Proxying.io’s high-speed proxies adds privacy and location control. Sign up now to get a free 25 MB test proxy; no credit card required.