用 tar 覆盖文件
我试图压缩一个文件并最终覆盖它。 我正在 Xcode 中工作,我想知道是否有办法恢复被覆盖的文件。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
除非你把它保存在其他地方,否则不太可能。 对不起
Unless you saved it somewhere else, its unlikely. sorry
是的,来自您的备份,当然,您经常定期进行备份,对吧?
转念一想,你可能不会,所以你运气不好。
我认为这是一个改变备份实践的机会:-)。
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 :-).
如果您的意思是在 tar 存档中添加了同一个文件两次,那么您很可能可以恢复它:tar 永远不会覆盖,它会附加。 并且在提取它时提取两者,这可能会导致覆盖。
如果您的意思是从 tar 存档中提取了一个文件并在此过程中覆盖了另一个文件,那么不幸的是您唯一的机会就是备份。 也许您的 Mac 上已安装 Time Machine,或者您正在使用 SCM 来执行开发任务。
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.