I was editing a text file with my notes on linux commands when I noticed a big chunk of it was missing (copy without paste, probably). The problem is that I already saved the document. (And this is a simple editor, so no hidden copies)
Now I found a number of blog posts (this one inparticular for instance), which show how you can easily search through a partion for text strings using grep:
$ sudo grep -a -C100 'sudo lshw -c' /dev/sdb2 > file.txt
But I get this after a while:
grep: memory exhausted
I understand from this answer that it is about
grep reading lines bigger than memory, so I guess I need similar code but without
It is 2 TB NTFS partition on a 3 TB harddisc.