Answer the question
In order to leave comments, you need to log in
How to remove output from ipython notebook everything hangs?
I accidentally wrote the output of a huge text in my laptop, now I don’t know how to edit it. Text editors hang, even console ones. Just cat outputs, but edit how? the output is unfortunately in the middle somewhere in the script
Answer the question
In order to leave comments, you need to log in
If you know any keywords or constructions at the beginning and end of the desired fragment, you can use "grep -n" to find the corresponding line numbers and use "head -n" and "tail -n" to cut off extra pieces from the beginning and end . Only the desired fragment will remain.
If it is difficult to search for line numbers, but the location of the fragment is approximately known (for example, in the very middle of the file), you can use "dd skip=<offset> count=<size>" to bite out a piece of reasonable size from an approximate offset, and already in this small piece text editor to find the desired fragment.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question