curl --retry 5 --retry-delay 2 -O https://example.com/archive.tgzUseful for flaky networks and CI pipelines.
Comprehensive curl patterns for downloads, retries, upload flows, range requests, SMTP, SFTP, and batch transfers.
Mirroring, retry logic, names, and batch workflows.
curl --retry 5 --retry-delay 2 -O https://example.com/archive.tgzUseful for flaky networks and CI pipelines.
Retry on all errors, including transient HTTP failures when appropriate.
curl --retry 5 --retry-all-errors -O https://example.com/archive.tgzStronger retry behavior for scripts and automation.
Use server-provided filename from headers.
curl -OJ https://example.com/download`-J` works with `-O` to honor `Content-Disposition` names.
Create local directories automatically for output paths.
curl --create-dirs -o downloads/reports/out.pdf https://example.com/report.pdfHandy when writing into nested destination paths.
curl --limit-rate 500K -O https://example.com/large.binUseful when testing or conserving bandwidth.
Abort a transfer if speed drops below a threshold for too long.
curl --speed-limit 1024 --speed-time 30 -O https://example.com/file.binGood for automation where stuck connections should fail.
Use a curl config file to store repeated options and URLs.
curl --config urls.txtcurl supports command-line option files via `-K` / `--config`.
Download several related URLs using brace expansion.
curl -O 'https://example.com/{a,b,c}.txt'curl supports URL globbing with lists and ranges.
curl -O 'https://example.com/logs/app[1-5].txt'Use bracket ranges for bulk downloads.
FTP/SFTP/HTTP uploads and stdin-driven transfers.
printf 'hello
' | curl -T - https://example.com/upload.txt`-T -` reads upload data from standard input.
curl -u user:pass -T ./backup.sql sftp://example.com/home/user/backup.sqlcurl supports SFTP as well as HTTP and HTTPS.
curl -u user:pass -T ./site.zip ftp://example.com/incoming/site.zipClassic FTP upload pattern.
Append uploaded data when the protocol and server support it.
curl --append -T ./log.txt ftp://example.com/log.txtMostly used with FTP/SFTP style workflows.
curl --url 'smtp://mail.example.com:587' --ssl-reqd --mail-from 'me@example.com' --mail-rcpt 'you@example.com' --upload-file email.txt -u 'me@example.com:password'curl supports SMTP and related mail protocols.