Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have a list of URLs separated by \n, are there any options I can pass to wget to download all the URLs and save them to the current directory, but only if the files don't already exist?

share|improve this question
Related: Skip download if files exist in wget? at SO – kenorb Aug 4 '15 at 8:46
up vote 9 down vote accepted

There is a -nc (--no-clobber) option for wget.

share|improve this answer

From wget --help:

-i,  --input-file=FILE     download URLs found in local or external FILE.
-nc, --no-clobber          skip downloads that would download to
                           existing files.
-c,  --continue            resume getting a partially-downloaded file.

I've included --continue because it seemed like it might be helpful if you're trying to recover from an interrupted download, but you don't need it to answer your original question.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.