Odi's astoundingly incomplete notes

New entries | Code

fix future file timestamps

When installing a new machine you often notice too late that the clock is wrong. Then you may have already created files with a future timestamp. This is bad as soon as you set your clock correctly. Now make will complain and may even fail to build correctly. Here is how to fix it:
  1. create a file with current timestamp: touch now
  2. fix all future files: find / -mount -newer now -print0 | xargs -0 touch
  3. we no longer need that file: rm now
Mind the order of the find options!
posted on 2010-02-25 17:10 UTC in Code | 1 comments | permalink
Thanks! Worked like a charm!