Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.
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) 
share|improve this question
I am not sure if this helps. cyberciti.biz/tips/linuxunix-recover-deleted-files.html – Ramesh Jul 9 '14 at 23:42
Have you checked for a ~/.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 0:13
@terdon Yes, I checked it. There is no .vimrc~ or .vimrc.swp – xralf Jul 10 '14 at 6:44
up vote 5 down vote accepted

Error code 13 is EACCES - an access violation.

You don't have permission to read from the device. Run the command as the superuser, i.e. use sudo extundelete ....

share|improve this answer
OK, I run it with sudo, but the problem with mounting still remains. – xralf Jul 10 '14 at 6:49
Finally I entered the system as a root but hit another problem. I will ask another question to keep it simple. – xralf Jul 10 '14 at 7:59

that error it is because your sda is ext4 and you are trying in ext3

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.