Overwritten file with tar

别说谁变了你拦得住时间么 提交于 2019-12-24 18:37:07

问题


I was trying to tar a file and ended up overwriting it. I was working in Xcode and I'm wondering if there is a way for me to recover the overwritten file.


回答1:


Unless you saved it somewhere else, its unlikely. sorry




回答2:


Yes, from your backups which, of course, you do regularly and frequently, right?

On second thoughts, you probably don't, so you're fresh out of luck.

I'd look on this as an opportunity to change your backup practices :-).




回答3:


If you mean that you added the same file twice in a tar archive, chances are that you can recover it: tar never overwrite, it appends. And when extracting it extract both which may result in an overwrite.

If you mean that you extracted a file from a tar archive and overwrote another in the process, unfortunately your only chance is backups. Maybe Time Machine is up on your Mac or you are using a SCM for your developer tasks.



来源:https://stackoverflow.com/questions/535508/overwritten-file-with-tar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!