title: Linux: automatic backup on save of changed file
body: <p>Is there any way/SW-tool that can be used to monitor a directory for changes to files and then either back it up to a unique file or to a version control system?</p>
  
  <p>Reason: I'm using Code::Blocks and get carried away editing/testing/changing and occasionally (@#$%!) would want/need to revert/recover a previous bit of code. I want the backup to happen silently in the background, a setup and forget thing, until I need it. Ideally it must backup a file each time it is saved.</p>
  
  <p>[edit 2010-09-29]</p>
  
  <p>I've used Matthew Iselin's 2nd suggestion (incron) to create my own solution, '<a href="https://github.com/slashmais/keeper" rel="nofollow noreferrer">keeper</a>' which I have open-sourced on GitHub. Hope it will be useful to others.</p>