You are not logged in.

#1 2010-02-14 12:15:28

bakMan
Member
Registered: 2010-02-14
Posts: 4

rm NIGHTMARE [SOLVED]

Hi guys, I made horrible mistake few days ago. I mistakenly wrote rm -R * ~/moje/ instead of rm -R ~/moje/* ( probably because  I was working with grep few minutes before and automatically used that syntax). I lost nearly 3/4 of all my files and everything in my /home/ . When I found out what happend I quickly turned off computer to prevent system from writing to sectors with deleted files. Do you know about some kind of rescue utlity/distro which can undelete files from ext4 filesystem ? Thank you in advance for your responses.

Last edited by bakMan (2010-03-11 13:52:29)

Offline

#2 2010-02-14 12:17:35

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: rm NIGHTMARE [SOLVED]

Which filesystem?
rm is a deadly command, your files are gone I believe.

EDIT: Ah you edited after I posted, hmm I don't know an utility for ext4 hmm

Last edited by sHyLoCk (2010-02-14 12:18:25)


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#3 2010-02-14 12:26:16

bakMan
Member
Registered: 2010-02-14
Posts: 4

Re: rm NIGHTMARE [SOLVED]

aghhr .. why am I always using terminal for everything ? .. jeez .. perhaps I'll start using GUI for such tasks from now on ...

Offline

#4 2010-02-14 12:26:24

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: rm NIGHTMARE [SOLVED]

You didn't Google? There's a sf project called extundelete that claims to be the only undelete option for ext4 - I found it in 3 seconds.

OT advice - by only asking here, you're drastically limiting the number of answers you might get. This is an emergency after all - use every resource you can find.

Offline

#5 2010-02-14 12:29:16

bakMan
Member
Registered: 2010-02-14
Posts: 4

Re: rm NIGHTMARE [SOLVED]

yup .. I found it .. but I didn't know if that utility is actually working and using it won't break my files for eternity. I wanted to find someone who had similar experience and made it out.

Offline

#6 2010-02-14 12:30:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: rm NIGHTMARE [SOLVED]


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2010-02-14 12:36:33

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: rm NIGHTMARE [SOLVED]

... and of course you will be taking regular backups from now on.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#8 2010-02-14 14:05:25

Vegita
Member
Registered: 2009-10-06
Posts: 111

Re: rm NIGHTMARE [SOLVED]

I have a hard disk with warranty, being repaired (because of sata port contact). It has a chance, that I'll get it back formatted by Win-dumbs, as it only had a second partition as ext3 (no first, it was merged to the second before)
If they format that hard drive/create new partition table, may extundelete work, or extundelete only works on existing ext* partitions?

Offline

#9 2010-02-14 14:27:20

kaivalagi
Member
From: Norwich, UK
Registered: 2009-11-05
Posts: 145

Re: rm NIGHTMARE [SOLVED]

Interesting read at: http://extundelete.sourceforge.net/
It talks about other options for recovery too...


Running Arch 64 (Made the switch to Arch 10/2009)
AUR | BZR

Offline

#10 2010-02-14 15:59:58

davidm
Member
Registered: 2009-04-25
Posts: 371

Re: rm NIGHTMARE [SOLVED]

I've had very good luck with Photorec (within testdisk I believe)

http://www.cgsecurity.org/wiki/PhotoRec

http://aur.archlinux.org/packages.php?ID=8377

It doesn't merely recover photos but almost everything.  The downside however is that it takes a lot of time to go through and find what you want. You might ask it to recover everything it can and to write it to a separate harddrive or flash drive.  Then you want to sort that. Make sure NOT to write the recovered files to the same disk as where you are trying to find the files. That will obviously overwrite your old data and you will lose more files.

Offline

#11 2010-02-14 16:56:03

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: rm NIGHTMARE [SOLVED]

+1 for testdisk/photorec.


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#12 2010-03-01 16:25:51

bakMan
Member
Registered: 2010-02-14
Posts: 4

Re: rm NIGHTMARE [SOLVED]

Than you for all your replies. Extundelete is just perfect. It saved nearly all my files smile

Offline

#13 2010-03-01 17:24:35

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: rm NIGHTMARE [SOLVED]

Glad you got it fixed. Please mark your thread as solved. wink
In the future, you might want to do something like:

alias rm='mv --target-directory ~/.Trash'

enjoy.

Offline

Board footer

Powered by FluxBB