I want to download 100 files that are 1GB each from a website but the file size is unknown since there is no Content-Length set in headers. My download is slow and unstable. When the download crash for a few seconds in the middle of the download, it starts downloading the next file and leave the previous file incomplete.

Normally I use wget -c or curl -C to resume partially downloaded files. It's possible to set my own Content-Length for each file to 1GB with wget or curl? If that's possible wget and curl won't go straight to the next file after a few seconds lag. Hopefully resuming the download will work like that too

1 Answer 1



wget --header="Content-Length: 1099511627776" ... 

According to the man-page:

       As of Wget 1.10, this option can be used to override headers otherwise generated
  • I tried but wget still says: Length: unspecified [application/7z, application/octet-stream] while downloading and when the download crash I need to restart the whole download. So it doesn't work for me
    – pwrsheller
    Commented Jan 10, 2023 at 21:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .