remind me ... (file undelete on FreeBSD 5.4)

Arne Wörner arne_woerner at yahoo.com
Sat Nov 26 09:14:39 GMT 2005


--- user <user at 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/


More information about the freebsd-fs mailing list