Downloading a file over an unstable connection with Wget ∞
I’m currently downloading a very big file (15GB) over a slow and unstable connection, so I was looking for a way to resume the download if the connection stalled or if I had to disconnect my notebook for a while.
I ended up using good old Wget with the following options:
wget -c --tries=0 --retry-connrefused --timeout=2 --wait=1 \ http://www.schmidp.com/bigfile
-c tells Wget to continue a download, so you can stop Wget and restart it later without downloading the whole file again.
–tries=0 means that the download will be tried indefinitely if the connection breaks.
–retry-connrefused forces Wget to retry even if the server is currently not listening.
–timeout=2 tells Wget to reconnect if no data is received for more than 2 seconds.
–wait=1 means Wget will sleep for one second before it reconnects.
comments powered by Disqus