{"id":1167,"date":"2013-01-07T22:31:46","date_gmt":"2013-01-07T19:31:46","guid":{"rendered":"http:\/\/hxml.me\/blog\/?p=1167"},"modified":"2013-01-07T22:33:14","modified_gmt":"2013-01-07T19:33:14","slug":"osx-vosstanovlenie-perezatertyx-fajlov","status":"publish","type":"post","link":"https:\/\/hxml.me\/blog\/apple\/osx-vosstanovlenie-perezatertyx-fajlov\/","title":{"rendered":"<!--:en-->OSX: restore overwritten files<!--:--><!--:ru-->OSX: \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0442\u0435\u0440\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432<!--:-->"},"content":{"rendered":"<p><!--:en--><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"http:\/\/hxml.me\/img\/post\/restore.png\" alt=\"\" width=\"256\" height=\"170\" \/><br \/>\nI&#8217;d like to share my happiness with you, the happinness related to the triumph of the human mind. Those moments in life there are extremely rare (at least in my one) &#8230;On holidays, I worked on a project in xCode IDE, and accidentally (!) <strong> completely overwrote<\/strong> one unit that I&#8217;ve been developing for two days. When I realized what I&#8217;ve done, I felt something very cold inside &#8212; my mind began to tear the hair on all parts of the body, evaluating dark prospects and fighting with a terrible feel of weakness. And suddenly, Behold! The panic began replacing with ghost hope born with the thought: actually <strong> HFS + <\/strong> (native <strong> OSX <\/strong> file system ) is <strong> versioning. <\/strong><!--:--><!--:ru--><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"http:\/\/hxml.me\/img\/post\/restore.png\" alt=\"\" width=\"256\" height=\"170\" \/>\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0442\u043e\u0440\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0443\u043c\u0430. \u0422\u0430\u043a\u0438\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0436\u0438\u0437\u043d\u0438  \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u0430\u043b\u043e (\u0432 \u043c\u043e\u0435\u0439 \u0442\u0430\u043a \u0442\u043e\u0447\u043d\u043e), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e \u0442\u0430\u043a \u0438 \u0440\u0430\u0434\u0443\u0435\u0442 :)&#8230;<br \/>\n\u041d\u0430 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a\u0430\u0445 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0432 xCode IDE, \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e (!) <strong>\u043f\u0435\u0440\u0435\u0437\u0430\u0442\u0435\u0440 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e <\/strong>\u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0434\u0432\u043e\u0435 \u0441\u0443\u0442\u043e\u043a. \u041a\u043e\u0433\u0434\u0430 \u044f \u043e\u0441\u043e\u0437\u043d\u0430\u043b \u0441\u043e\u0434\u0435\u044f\u043d\u043d\u043e\u0435, \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u043d\u044f \u0432\u0441\u0435 \u043f\u043e\u0445\u043e\u043b\u043e\u0434\u0435\u043b\u043e &#8212; \u044f \u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u0441\u0442\u0430\u043b \u0440\u0432\u0430\u0442\u044c \u0432\u043e\u043b\u043e\u0441\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u0442\u0435\u043b\u0430, \u043f\u0440\u0438\u043a\u0438\u0434\u044b\u0432\u0430\u044f \u0431\u0435\u0437\u0440\u0430\u0434\u043e\u0441\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u044b \u0438 \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u0436\u0443\u0442\u043a\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u043e\u043c \u0431\u0435\u0441\u0441\u0438\u043b\u0438\u044f. \u0418, \u043e \u0447\u0443\u0434\u043e! \u041d\u0430 \u0441\u043c\u0435\u043d\u0443 \u043f\u0430\u043d\u0438\u043a\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u043f\u0440\u0438\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u043d\u0430\u0434\u0435\u0436\u0434\u0430, \u043f\u043e\u0440\u0430\u0436\u0434\u0435\u043d\u043d\u0430\u044f \u043c\u044b\u0441\u043b\u044c\u044e: \u0430 \u0432\u0435\u0434\u044c<strong> HFS+<\/strong> (\u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f <strong>\u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 OSX<\/strong>) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <strong>\u0432\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u043e\u0439<\/strong>!<!--:--><!--more--><!--:en--><br \/>\nIn theory this means that the file system stores all versions of the file, which means that you can find and <strong> restore to the correct version <\/strong>. But how? Half an hour of Google-search gave 100% result.So,  hertr is my recipe &#171;<strong> How to restore an overwritten file in OSX <\/strong>&#171;.<br \/>\nI couldn&#8217;t find how to do it right from xCode. So just open the Finder, find your file (which is overwritten), right mouse click it and select Open With -&gt; TextEdit.app.<br \/>\nIn a text editor, click the on the window title in the area of file name, then context menu appears. Select the View all versions, and &#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/hxml.me\/img\/post\/restore\/RestorePost1.png\" alt=\"\" width=\"540\" height=\"364\" \/><\/strong><\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n<p>voila!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/hxml.me\/img\/post\/restore\/RestorePost2.png\" alt=\"\" width=\"540\" height=\"364\" \/><\/p>\n<p>I guess futher explanation is redundand<br \/>\n<!--:--><!--:ru--><br \/>\n\u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0444\u0430\u0439\u043b\u0430, \u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0438 <strong>\u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/strong>. \u041d\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c?<br \/>\n\u041f\u043e\u043b\u0447\u0430\u0441\u0430 \u0433\u0443\u0433\u043b\u043e-\u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u0434\u0430\u043b\u0438 100% \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<br \/>\n\u0418 \u0442\u0430\u043a, \u043c\u043e\u0439 \u0440\u0435\u0446\u0435\u043f\u0442 &#171;<strong>\u041a\u0430\u043a \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u0442\u0435\u0440\u0442\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 OSX<\/strong>&#171;.<br \/>\n\u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u0441\u0430\u043c\u043e\u0433\u043e xCode, \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043b. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Finder, \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0432\u043e\u0439 \u0444\u0430\u0439\u043b (\u043f\u0435\u0440\u0435\u0437\u0430\u0442\u0435\u0440\u0442\u044b\u0439), \u043d\u0430 \u043d\u0435\u043c \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 -&gt; TextEdit.app<br \/>\n\u0412 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u043c\u044b\u0448\u044c\u044e \u043f\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0443 \u043e\u043a\u043d\u0430 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u0432\u0435\u0440\u0441\u0438\u0438, \u0438&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/hxml.me\/img\/post\/restore\/RestorePost1.png\" alt=\"\" width=\"540\" height=\"364\" \/><\/p>\n<p>\u0432\u0443\u0430\u043b\u044f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/hxml.me\/img\/post\/restore\/RestorePost2.png\" alt=\"\" width=\"540\" height=\"364\" \/><\/p>\n<p>\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0434\u0443\u043c\u0430\u044e, \u0438\u0437\u043b\u0438\u0448\u043d\u0438.<!--:--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;d like to share my happiness with you, the happinness related to the triumph of the human mind. Those moments in life there are extremely rare (at least in my one) &#8230;On holidays, I worked on a project in xCode IDE, and accidentally (!) completely overwrote one unit that I&#8217;ve been developing for two days. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60],"tags":[83],"class_list":["post-1167","post","type-post","status-publish","format-standard","hentry","category-apple","tag-mac-os-x"],"_links":{"self":[{"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/posts\/1167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/comments?post=1167"}],"version-history":[{"count":17,"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/posts\/1167\/revisions"}],"predecessor-version":[{"id":1525,"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/posts\/1167\/revisions\/1525"}],"wp:attachment":[{"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/media?parent=1167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/categories?post=1167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hxml.me\/blog\/wp-json\/wp\/v2\/tags?post=1167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}