0

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?

  • 1
    https://tex.stackexchange.com/a/329708/2388 – Ulrike Fischer Jun 12 '19 at 22:15
  • 1
    Just restore the file from your backup. If you don't have a backup but are on Linux you can try grep -a -b "text in the deleted file" /dev/sda1 to search the hard drive for remnants of that file. The byte offset it prints can be used to restore the file using dd or other tools. – Henri Menke Jun 12 '19 at 23:54
  • Thank you all so much for your responses! Fortunately, I had saved my work some days ago, so the damage is not disastrous. I will type again the missing part. – user190913 Jun 13 '19 at 08:04

0 Answers0