public
Last active

  • Download Gist
hammer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
[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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.