I accidentally run rm -r /home/xralf
and quickly killed it with Ctrl+C.
It seemed that everything is OK, but I noticed that my .vimrc
, which is importent for me, is missing.
I tried the command:
$ extundelete /dev/sda5 --restore-file /home/xralf/.vimrc
extundelete: failed to read-only open device "/dev/sda5": Error code 13
To recover the file, but there seems to be a problem, I need to unmount the device.
It's mounted here: /dev/sda5 on /home type ext4 (rw)
- Is there some possibility to recover the file
.vimrc
? - How would you remount it? There is a problem I need
$HOME
directory.
I can't use LiveCD
, because it's missing on my laptop now. Booting from USB
is not supported on my laptop as well.
Running the command with sudo
:
sudo extundelete /dev/sda5 --restore-file /home/xralf/.vimrc
WARNING: Extended attributes are not restored.
WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set.
The partition should be unmounted to undelete any files without further data loss.
If the partition is not currently mounted, this message indicates
it was improperly unmounted, and you should run fsck before continuing.
If you decide to continue, extundelete may overwrite some of the deleted
files and make recovering those files impossible. You should unmount the
file system and check it with fsck before using extundelete.
Would you like to continue? (y/n)
~/.vimrc~
file? Also, I know this is locking the barn after the horse's been stolen but there's a very nice article on our blog on how to set up your system to avoid this type of thing. – terdon Jul 10 '14 at 00:13.vimrc~
or.vimrc.swp
– xralf Jul 10 '14 at 06:44