Not a command, no. What guarantee would you have that you caught it at the right instant? You need something more fundamental.
Linux can do so at the filesystem level with
NILFS, a snapshotting filesystem which keeps past versions of files in case you need them. Each snapshot is independently accessible.
It'd be a big space waster for files that change often of course! A huge file that completely changes all the time would take a lot of space to snapshot.