从Eclipse本地历史记录直接还原已删除的文件 [英] Restore deleted file directly from Eclipse local history
问题描述
任何人都知道如何还原或读取.metadata.plugins\org.eclipse.core.resources.history
文件?
我能够恢复我的代码。
我去了prj / .metadata / .plugins / org.eclipse.core .resources / .history
然后做了一些冲击:
fgrep -r -c[一些功能该文件的特定名称]* | grep -v:0| cut -d:-f 1 | xargs ls -l | grepJul 29
所以这是贪婪和计数一些特定于代码的文本的次数我在文件中缺少显示,然后删除计数为0的文件,然后从文件名的末尾删除计数,然后执行文件的详细信息,然后选择搜索特定的日期。因为我正在使用clojure,我注意到有一个文件大小的文件。大文件是REPL的备份,小文件是代码的备份。
+1 for Eclipse:)
Some git mistakes happened and I lost a lot of changes for one file. I was using Eclipse as my IDE but the git mishap included deleting the project and re cloning the directory. So I can't do the restore from within Eclipse. I believe I have found the local history file that contains the code I want to restore but I'm not sure how to cat this file. It kinda looks like a json.
Anyone know how to restore or read the .metadata.plugins\org.eclipse.core.resources.history files?
I was able to recover my code.
I went to prj/.metadata/.plugins/org.eclipse.core.resources/.history
Then did some bashing:
fgrep -r -c "[Some function name specific to that file]" * | grep -v ":0" | cut -d : -f 1 | xargs ls -l | grep "Jul 29"
So this is greping and counting the number of times some text specific to the code I'm missing shows up in the files, then removes the files where the count is 0, then removes the count from the end of the file name, then does ls to get details on the files, then optionally search for a specific day. Since I was working with clojure I noticed that there were files that either had a large or small file size. The large files were backups of the REPL, the small files were backups of the code.
+1 for Eclipse :)
这篇关于从Eclipse本地历史记录直接还原已删除的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!