如何恢复已删除的iPython笔记本 [英] How to recover deleted iPython Notebooks

查看:102
本文介绍了如何恢复已删除的iPython笔记本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过Anaconda拥有iPython Notebook.我不小心删除了一个重要的笔记本,但我似乎无法在垃圾箱中找到它(我不认为iPy笔记本会丢到垃圾箱中.)

I have iPython Notebook through Anaconda. I accidentally deleted an important notebook, and I can't seem to find it in trash (I don't think iPy Notebooks go to the trash).

有人知道我该如何找回笔记本吗?我正在使用Mac OS X.

Does anyone know how I can recover the notebook? I am using Mac OS X.

谢谢!

推荐答案

这是有关Thuener的答案的一些附加信息,

This is bit of additional info on the answer by Thuener,

我执行了以下操作来恢复删除的.ipynb文件.

I did the following to recover my deleted .ipynb file.

  1. 缓存位于〜/.cache/chromium/Default/Cache/中(我使用铬)
  2. 在二进制搜索模式下使用了grep,grep -a'import math'(用代码中特定的关键字替换搜索字符串)
  3. 在vim中编辑二进制文件(在gedit中不会打开)
    • python ipynb文件应以'{"cells":'和
    • 开头
    • 以'"nbformat":4,"nbformat_minor":2}'结尾
    • 删除这些起点和终点之外的所有东西
  1. The cache is in ~/.cache/chromium/Default/Cache/ (I use chromium)
  2. used grep in binary search mode, grep -a 'import math' (replace search string by a keyword specific in your code)
  3. Edit the binary file in vim (it doesn't open in gedit)
    • The python ipynb should file start with '{ "cells":' and
    • ends with '"nbformat": 4, "nbformat_minor": 2}'
    • remove everything outside these start and end points

这篇关于如何恢复已删除的iPython笔记本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆