How can I set up something on a Linux machine so that the moment a file on a web server returns something other than a 404 error it will download it. I would like it to stop checking the moment the file is started to download successfully, but still retry if it fails.
I have tried using a cron job with wget, but I can't seem to figure out how to make it not create an empty file on a 404 error.
Is this possible and how?