Linked by Amjith Ramanujam on Tue 15th Jul 2008 22:49 UTC
Linux The ext3undel utility can recover accidently removed data on ext3 filesystems. Users can recover a specific file by name, or they can restore all files marked as deleted. ext3undel is a wrapper for other recovery programs such as Photorec, Foremost and SleuthKit.
Order by: Score:
photorec
by mikesum32 on Wed 16th Jul 2008 01:32 UTC
mikesum32
Member since:
2005-10-22

Photorec is an awesome piece of software. Don't tell anyone else about it. ;-)

Reply Score: 2

Nice!
by hollovoid on Wed 16th Jul 2008 05:31 UTC
hollovoid
Member since:
2005-09-21

This will make my nast habit of holding shift when I delete something a little less drastic when I realize something important got selected.

I know I know, thats what the trash/recycle bin is for, but at the command line, anything will and does go!

Reply Score: 2

RE: Nice!
by Knuckles on Wed 16th Jul 2008 09:00 UTC in reply to "Nice!"
Knuckles Member since:
2005-06-29

Yeah I had the habit of using shift too, until I configured konqueror to ignore shift+delete, and I got rid of that crappy habit ;)

But yeah from the command-line, either you have alias rm="rm -i" or you really do have to be careful.

Reply Score: 2

RE: Nice!
by sakeniwefu on Wed 16th Jul 2008 09:48 UTC in reply to "Nice!"
sakeniwefu Member since:
2008-02-26

When did that become a nasty habit? I have never deleted a file I didn't want to and I'd rather that than having files I don't need piling up in a system folder. And there never is enough disk space to forget about the "recycled" stuff.
In the nineties it was the "Word" files, in the 00s it was the mp3s, now it is 4Gb DVD images or rips, or in my case 10Gb virtual machine drives - they somehow always manage to fill up your disk drive whatever its size.

Reply Score: 2

RE[2]: Nice!
by hollovoid on Wed 16th Jul 2008 12:00 UTC in reply to "RE: Nice!"
hollovoid Member since:
2005-09-21

When did that become a nasty habit? I have never deleted a file I didn't want to and I'd rather that than having files I don't need piling up in a system folder.


When your doing system things you shoulden't do after being up for a day and 1/2. ;)

Reply Score: 2

RE: Nice!
by FunkyELF on Thu 17th Jul 2008 14:39 UTC in reply to "Nice!"
FunkyELF Member since:
2006-07-26

Couldn't you set up a bash alias or function where rm is actually mv?

Reply Score: 2

Not available
by msundman on Wed 16th Jul 2008 10:26 UTC
msundman
Member since:
2005-07-06

$ sudo aptitude install ext3undel
[...]
Couldn't find any package whose name or description matched "ext3undel"
Couldn't find any package whose name or description matched "ext3undel"
No packages will be installed, upgraded, or removed.
[...]

Reply Score: 1

RE: Not available
by libray on Wed 16th Jul 2008 13:06 UTC in reply to "Not available"
libray Member since:
2005-08-27
Comment by righard
by righard on Wed 16th Jul 2008 13:37 UTC
righard
Member since:
2007-12-26

If this works, it's no more ext2 for me. I never switched to ext3 because for some reason I never learned stop doing this...
$ rm * -R
Hmm, why did that take so long, did I forget something?
$ pwd
/home/righard
yes i did, damn

Reply Score: 1

RE: Comment by righard
by ozonehole on Wed 16th Jul 2008 14:49 UTC in reply to "Comment by righard"
ozonehole Member since:
2006-01-07

Put the following into your .bashrc and .bash_profile files:

PS1="\u@\h:\w> "
export PS1
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
set -o noclobber

The first two lines will set your command line prompt to show you which directory you are in. No more need for the "pwd" command.

The three "alias" lines will for you to confirm with a yes/no prompt before deleting, copying or moving a file.

The "noclobber" line will prevent you from overwriting an existing file. If you want to overwrite a file, you'll have to manually delete the old one first.

Of course, you have to logout/login one time for these settings to take effect, because that restarts the bash shell.

Reply Score: 1

RE[2]: Comment by righard
by backdoc on Wed 16th Jul 2008 15:23 UTC in reply to "RE: Comment by righard"
backdoc Member since:
2006-01-14

I didn't know about noclobber. I may use that. But, the "-i" stuff just gets on my nerves.

Here's a tip for you. You don't have to log out to reread the dot files. All you need to do is at the command prompt: ". .profile". For clarification, at the command prompt, type a "dot" followed by a "space" followed by the name of the hidden resource file you wish to reread.

Reply Score: 2

RE[3]: Comment by righard
by FunkyELF on Thu 17th Jul 2008 14:43 UTC in reply to "RE[2]: Comment by righard"
FunkyELF Member since:
2006-07-26

I just "source ~/.bashrc" which should source everything that normally gets sourced when you log in.

Reply Score: 2

Bummer
by fsckit on Wed 16th Jul 2008 17:20 UTC
fsckit
Member since:
2006-09-24

I got a bit excited when I saw this and immediately went to work installing the script and it's dependencies. What I found is that it is entirely a crapshoot whether or not this thing will even be able to find the file you're looking for. More often than not, it didn't.

Edited 2008-07-16 17:20 UTC

Reply Score: 2

Not really....
by chimby on Wed 16th Jul 2008 19:39 UTC
chimby
Member since:
2006-10-02

You should be aware that the ext3 fs actually zero's out the block pointers in the inode when a file is deleted, so file recovery programs/scripts are not very reliable. If your file spans several blocks and if it is a binary file forget it. If your file has some identifiable text you might be able to manually rebuild the pointers if you are lucky and have lots of time.

I have had the bad experience of dropping the wrong MySQL db and was unable to recover it. I had to completely rebuild all my work. However, before that I tried everything in my power to recover the old one. At the end of the day it was just easier to re-create it.

Edited 2008-07-16 19:40 UTC

Reply Score: 1