[texhax] corrupted TeX file

Reinhard Kotucha reinhard.kotucha at web.de
Wed Oct 27 09:59:29 CEST 2010

On 26 October 2010 Donald Arseneau wrote:

 > Steve Revilak <steve at srevilak.net> writes:
 > > >From: Vafa Khalighi <vafakhlgh at gmail.com>
 > > 
 > > >I received this question from a user.
 > > >
 > > >He was typing the tex file while suddenly power was cut
 > > >off. When he turned his computer on, he has got this corrupted
 > > >tex file. Is there a way to recover this tex file? The file is
 > > >in UTF8.
 > > 
 > > Unfortunately, this does not look good.  bahar.tex seems to be
 > > nothing more than a long series of null bytes:
 > Now the question is: what editor?  Text editors usually maintain a 
 > previous version as a backup copy, and sometimes a check of recent
 > edits so the content can be restored to within a few minutes.
 > Look for files (perhaps hidden files) with "bahar" in the name.

I'm wondering what filled up the file with null bytes.  This can't
happen when power is cut.  It just takes too much time to write such a
file.  It's more likely that the file system is corrupt and the system
tried to repair it at boot time.  On Linux I would then look for
orphaned data blocks in the lost+found directory of the partition
containing the file.


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the texhax mailing list