Re: ext3 and undeletion

From: Pavel Machek (pavel@suse.cz)
Date: Wed Mar 06 2002 - 06:30:33 EST


Hi!

> > Okay, and I *did* need unrm few times. Few examples:
> >
> > /dev# rm sbpcd * (simple typo, recovered by immediate powerdown + fsck)
>
> % rm sbpcd *
> zsh: sure you want to delete all the files in /dev [yn]? n
> rm: remove write-protected file `sbpcd'? n
> %

Is it decent enough to do rm -rf /usr/src/linux without asking?

> > /big$ mp1enc > samotari.mpg (oops, I did it twice, second time by mistake, and
> > powerswitch was too far away to make it in time)
> >
> > So yes, unrm is usefull. And it would be even more usefull if it recovered
> > truncated files, too. How many times did you do > instead of >>? I did that
> > mistake many times, its just easy..
>
> % cat > foo
> zsh: file exists: foo
> % cat >| foo
> [Now zsh is quiet. It even "fixes up" the history if you want so, so
> that you can simply press "Up"+"Enter" if you really want to overwrite
> the file]

This would not help. mp1enc has nasty habit of randomly not starting,
so I had to repeat the command above few times. What was wrong was
that I repeated it one time too many times.

> Surely, protection against typos etc. has its value. But do it at the
> place where does typos happen (ie. at the shell prompt), not by
> messing with lowlevel stuff like the unlink syscall, which

Not sure it is possible. What you want is safety nets in every
app.

> a) catches only very few ways of destroying a files contents
> b) poses a /great/ deal of complexity on you (like having to
> identify tempfiles, managing disk space etc.)

Really? ext2 *already* is undelete capable. mc: cd /#undel:hda3. So,
where's that great complexity?
                                                                Pavel

-- 
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 07 2002 - 21:00:54 EST