lkml.org 
[lkml]   [2002]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: ext3 and undeletion
Date
From
A lot of talk about "daemons" ... seems overkill to me.  Any reason not
to let each user do this on their own? I've got an rm/unrm program
that just stores the "rescued" files in your home directory for a
period of time based on the either the name or pathname.

It is not fully "hardened" -- it is possible to conceive of filenames
and filename/directory name pairs which will confuse it -- but it is
certainly functional for 98% of cases, which has been good enough for
my personal use.

Disadvantages:
* the mtime is purposefully changed when the file is deleted to make
it easy to tell when a file was "deleted", so you lose that information.
* Directory modes and owners are not maintained.
* File ownerships are maintained only to the extent that a hard
link allows you to. If you couldn't do a hard link (cross file
systems) then the "saved" file will be owned by you unless you
are root.
* There's no way to say "save until X amount is saved then really
delete" (whether "X amount" is %age of file system, a fixed amount,
or some other criteria). The only criteria is age of deletion.
* (true) deletions are only attempted when a subsequent file is rm'ed.
So it's conceivable to delete 300Mb of data that is scheduled to
disappear in 30 seconds but not have it go away for three days,
because you left town for the weekend and neither you nor your
cron scripts ran "rm" again until Monday.

If this sort of program is useful to folks, I'm more than happy to
provide it. No doubt it could be enhanced to address some of the
shortcomings above. I just got tired many years ago of accidentally
typing "rm * .o" and only finding out my typo when I saw "rm: .o: file
not found" and it has, for the most part, served with minor modifications
for many years.

Rick
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:21    [W:0.189 / U:3.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site