I was just reading some text file and some keys were pressed by me on keyboard and all text was gone from that text file and by mistake I closed that file by "closed with saving" option. This text file is very important for me. I have checked it as hidden file in that folder but It is not showing. I have also used command sudo strings /dev/mem but it is showing some text which I can't understand and I also used sudo strings /dev/mem | grep -r some text of file but It got paused and not showing anything.
So, I would like to know, Is there any way to go to last saved state of that text file. Please help.
grep -a -B 25 -A 100 'containing string' /dev/sda1 > result.txt
– pLumo Jan 16 '19 at 12:35/home/ankit/Desktop/GOVol3Practice.txt
with the path to your device (/dev/sdXY
). – pLumo Jan 16 '19 at 12:58