Commands.page Logo

Ubuntu Wget Continue Downloading Even If Some Links Fail

This article outlines the specific wget command option required on Ubuntu to ensure batch downloads proceed despite individual URL failures. It provides the exact syntax needed to ignore errors and complete the remaining file transfers without manual intervention.

The Correct Wget Option

The option that allows wget to continue downloading even if some links fail is --ignore-errors. When you are downloading a list of URLs, some links may be broken, return a 404 error, or time out. By default, wget might stop or report these as critical failures. Using this flag tells the utility to skip the failed links and proceed to the next one in the queue.

How to Use the Command

To use this option, you typically combine it with the -i flag, which reads URLs from a file. The basic syntax looks like this:

wget --ignore-errors -i url-list.txt

You can also use it directly with multiple URLs specified on the command line:

wget --ignore-errors http://example.com/file1.zip http://example.com/file2.zip

Difference Between Ignore Errors and Continue

It is important to distinguish --ignore-errors from the --continue (or -c) option. The --continue flag is used to resume a single interrupted download from where it left off. In contrast, --ignore-errors is used when downloading multiple files to ensure that one bad link does not halt the entire batch process. For robust scripting on Ubuntu, you may often use both flags together.