brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: curl -C – resumes an interrupted download where it stopped

Curl
~/tips/tip-curl-resume-download-continue

curl -C - -O https://example.com/big.iso

Continues a partly downloaded file from its current size instead of restarting.

Starting a big ISO over after a dropped connection is a waste of time.

curl -C - -O https://example.com/big.iso

-C - tells curl to look at the size of the local file and ask the server for the rest with a Range request. Run the same command again after an interruption. It only works when the server supports byte ranges, and the remote file must be unchanged. -O keeps the remote file name.

Further reading: curl manual

More Curl tips curl --trace-ascii – https://example.com/ Retry-After: 120 curl -fsS --fail-early \ url = "https://example.com/data/latest.json" curl -4 -s -o /dev/null -w '%{remote_ip} %{http_code}\n' https://example.com/ All Curl tips (71) All topics

Link