You could use the --tries
option.
--tries=number
Set number of retries to number. Specify 0 or inf for infinite
retrying. The default is to retry 20 times, with the exception of
fatal errors like "connection refused" or "not found" (404), which
are not retried.
So --tries=0
should do the trick.
That, combined with --read-timeout=seconds
too. The seconds refers to idle time: if, at any point in the download, no data is received for more than the specified number of seconds, reading fails and the download is restarted.
So the final command:
wget -c --tries=0 --read-timeout=20 [URL]
--read-timeout=seconds
instead. The "time" of this timeout refers to idle time: if, at any point in the download, no data is received for more than the specified number of seconds, reading fails and the download is restarted. This option does not directly affect the duration of the entire download. Of course, the remote server may choose to terminate the connection sooner than this option requires. The default read timeout is 900 seconds. – Pablo Zubieta Oct 27 '11 at 03:10-c
to the answer so if anything fails you can pick up where you left off. Thanks. – Pablo Zubieta Jan 14 '15 at 18:17