Power went down while editing a file with Geany and the file got truncated to 0 bytes ... Is it possible to recover the file ?
Asked
Active
Viewed 965 times
0
-
What file system is the file on? Did you run `fsck`? Did the file contain anything at a previous point? – David Foerster Oct 03 '13 at 09:19
-
@DavidFoerster the file was on a ext4 file s/m (it was on the root partition) – dhanesh sr Oct 03 '13 at 14:04
-
The best way to add additional information to your question is by editing it, with the *edit* button. It is better visible that way, and comments are mainly for secondary, temporary purposes. Comments are removed under a variety of circumstances. Anything important to your question should be in the question itself. – guntbert Oct 03 '13 at 16:53
1 Answers
0
Normally editors rename the file to a backup, usually with a '#' or '~' in the name, and then save the new file. In your case, the power failed before the new file was written, so just look for the backup.
psusi
- 37,033
- 2
- 68
- 106
-
Geany does not automatically create backup files (AFAIK) ... and it was not a new file ... i was editing a file which was already on the disk – dhanesh sr Oct 03 '13 at 14:02
-
@dhaneshsr, yes, and normally editors save the new version to a new file, then replace the original with it, and move the original to a backup. If there's no backup, then it's gone. – psusi Oct 03 '13 at 14:03