title: using wget to overwrite file but use temporary filename until full file is received, then rename
body: <p>I'm using wget in a cron job to fetch a .jpg file into a web server folder once per minute (with same filename each time, overwriting).  This folder is "live" in that the web server also serves that image from there.  However if someone web-browses to that page during the time the image is being fetched, it is considered a jpg with errors and says so in the browser.  So what I need to do is, similar to when Firefox is downloading a file, wget should write to a temporary file, either in /var or in the destination folder but with a temporary name, until it has the whole thing, then rename in an atomic (or at least negligible-duration) step.</p>
  
  <p>I've read the wget man page and there doesn't seem to be a command line option for this.  Have I missed it?  Or do I need to do two commands in my cron job, a wget and a move?</p>