Is there a way to check the version of a file using wget, and then download it if it's newer? Trying to make an update script/launcher for a game.

wget http://testing.albiononline.com/clients/Albion-Online-Client-Linux.zip
  • I can't answer my own question but I found it reading the -h (like I should have) it was -N that I was looking for. Mar 27, 2014 at 21:10
  • On the contrary, not only can you answer your own question, you are very much encouraged to do so. These sites are wikis and self answered questions are very welcome. In any case, please do answer, because we have not understood what you mean. -N will not give you the version, only the age of the file which is something completely different.
    – terdon
    Mar 27, 2014 at 23:21

1 Answer 1


wget --content-disposition URL

Update: This is supposed to be the command but according to the man page it is experimental. It may not work.

You can use wget --no-clobber "URL". What this does is skips any files that you already have. Though I am bit confused. If you already have the URL to the exact filename, how could the version be different? I would make it version controlled/archived.

wget --spider "URL" may also be useful for you.

The man wget description

‘--spider’ When invoked with this option, Wget will behave as a Web spider, which means that it will not download the pages, just check that they are there. For example, you can use Wget to check your bookmarks:

      `wget --spider --force-html -i bookmarks.html` 

This feature needs much more work for Wget to get close to the functionality of real web spiders.

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.