Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Nov 2005 01:14:38 -0800 (PST)
From:      Arne "Wörner" <arne_woerner@yahoo.com>
To:        user <user@dhp.com>, freebsd-fs@freebsd.org
Subject:   Re: remind me ... (file undelete on FreeBSD 5.4)
Message-ID:  <20051126091438.4422.qmail@web30303.mail.mud.yahoo.com>
In-Reply-To: <Pine.LNX.4.21.0511260228160.8180-100000@shell.dhp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--- user <user@dhp.com> wrote:
> ln -s /some/dir/somewhere local
> 
> (used the symlink named local for a while)
> 
> rm -rf local
> 
> local still exists in my current working directory, but
> now /some/dir/somewhere is gone.
> 
> ---
> 
> So I rm -rf'd a symlink.  I just wanted to delete the
> link, and of course, it deleted the target.
> 
> I then immediately mounted the filesystem read-only.
> (it's all I could think of to do to preserve things
> right at that state...)
> 
> I did not have a snapshot enabled on the filesystem.
> 
> I know the bits are still there ... is there any way
> to get them back ?
> 
Hmm... I think there was such a problem before on a freebsd
list...

Did u tell your box to do "rm -rf local" or to do "rm -rf local/"?

I did an experiment:
% mkdir a
% ln -s a b
% rm -rf b
% ls -l
[...]
drwxrwxr-x  2 aw  aw   512 Nov 26 09:04 a
[...]
% ln -s a b
% rm -rf b/
% ls -l
[...]
lrwxrwxr-x  1 aw  aw     1 Nov 26 09:04 b -> a
[...]

In ports/sysutils/autopsy u might find a useful little helper...
There was another tool, but I did not find it...

-Arne


		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free. 
http://music.yahoo.com/unlimited/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051126091438.4422.qmail>