Is it possible to use wget to download a file, if only it's not modified?

I'm thinking about the HTTP status code 304, but I don't know how to instruct wget to add a If-Modified-Since header, or something similar.

Is it even possible? I can use other tools to do that as well


2 Answers 2


You may wish to read this, http://www.editcorp.com/Personal/Lars_Appel/wget/wget_5.html

Basically, it's :

wget -N http://www.some-url.com/folder/

If you want to add a header, you can use the --header option:

wget --header="If-Modified-Since: …" http://example.com/

But for the specific case in the question, it’s better to do as the other answer here suggests: Just use the -N option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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