I was working on TexStudio and accidentally pulled out the plug, the PC turned off immediately (no battery). It happens regularly. However, this time when I restarted it and tried to open the .tex file it was completely blank, the same thing happens with the respective pdf file too. I have tried to open it with several other apps (word, notepad, Notepad++, Texmaker, Overleaf, etc.) and nothing works. In particular, when I open it with Notepad++ the text reads NULL NULL NULL...., just like someone put blanks on my code and ran it. The size of the code is still several hundred Kbs and the system had a Windows 10 update earlier that day.
Do you have any idea on what can possibly have happened? Is it possible to retrieve the code?
grep -a -b "text in the deleted file" /dev/sda1to search the hard drive for remnants of that file. The byte offset it prints can be used to restore the file usingddor other tools. – Henri Menke Jun 12 '19 at 23:54