2

I accidentally deleted the file .vimrc in my $HOME directory.

I rebooted the system and accessed it as root.

Then:

$ sudo mount -o remount,ro /dev/sda5

$ sudo extundelete /dev/sda5 --restore-file /home/xralf/.vimrc

The output of the command indicates that it failed to restore .vimrc file.

Is the file already absolutely lost or is there some other possibility to recover it?

xralf
  • 16,149
  • 29
  • 101
  • 149

1 Answers1

4

Most probably lost. During the reboot, your system would have written to disk many times.

I know it's too late now, but the second you noticed you'd deleted the file you should have physically powered off the machine (not gracefully shut it down - pull the power cord).

At that point you could have booted with a recovery CD/USB ensuring that the disk where the file was located isn't mounted rw.

Next, you could have used your recovery tools to try and save the file. There is no guarantee, but you'd have stood a better chance.

There are special boot disks available for this sort of task such as System Rescue CD and The Ultimate Boot CD.

garethTheRed
  • 33,289
  • 4
  • 92
  • 101