Skip to content

Instantly share code, notes, and snippets.

@llelf
Last active December 30, 2015 17:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save llelf/7862414 to your computer and use it in GitHub Desktop.
Save llelf/7862414 to your computer and use it in GitHub Desktop.
[lelf@dragon ~]$ echo 11111111 > myfile
[lelf@dragon ~]$ sync
[lelf@dragon ~]$ echo 22222222 >> myfile
[lelf@dragon ~]$ sync
[lelf@dragon ~]$ hammer history myfile
myfile 00000001073a3ee6 clean {
00000001073abc60 08-Dec-2013 23:05:34
00000001073abd20 08-Dec-2013 23:05:47
}
[lelf@dragon ~]$ undo -t 00000001073abc60 myfile
>>> myfile 0000 0x00000001073abc60 08-Dec-2013 23:05:34
11111111
[lelf@dragon ~]$ rm myfile
[lelf@dragon ~]$ ls myfile
ls: myfile: No such file or directory
[lelf@dragon ~]$ undo -a myfile
myfile: ITERATE ENTIRE HISTORY
>>> myfile 0001 0x00000001073abc20 08-Dec-2013 23:05:15
11111111
22222222
>>> myfile 0002 0x00000001073abc60 08-Dec-2013 23:05:34
11111111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment