[Gllug] Undelete...?

David Irvine maillist at glasgownet.com
Thu Feb 5 14:24:51 UTC 2004

On Thu, 2004-02-05 at 14:13, Kristian Davies wrote:
> mdk 7
> I had a directory with a couple of files starting with "?blah"
> So like a Burk I deleted them with "rm -fr ?*" ... Don't laugh!
> Well anyway, in that directory was a script I use all the time, which I
> would rather no rewrite.
> Is there a way of getting my file back?
I dont think linux has an undelete command, however, when you rm a file,
it simply removes the link to the file, so in the passed when one of our
programmers deleted something he'd spent a long time hacking together,
we opened /dev/sda2 with vi and searched for parts of the file until we
found it, then we just copied it into a new file, and saved.  Its ugly,
but it works.  I'm sure there are better ways.

You may also be interested in chattr, you can set +u which does allow
files to be undeleted, im not sure how though.

Good luck

-- David Irvine
-- http://www.irvined.co.uk
-- 0775 319 6002

Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list