I had a linux plain text document file with close to 100000 lines, a size of 10 Mb. I accidentally overwrote the file via python code. But I got an exception in the middle of the code and think the file socket did not get closed properly. The new file has a few new lines (250) ,BUT the size of the file corresponds to the old one. I was wondering if the old content will still be there within the file and any chances of recovering the same. I tried using TestDisk and poked around a little bit. But it did not have any option for working on a particular file or maybe I am doing it wrong. I dont have any expertise in file systems and would really appreciate any pointers on how to proceed. Thanks
Recover an overwritten file
filesystems;data recovery