Re: How to safely delete a Symlink
From: Thomas Schweikle (tpsX_at_vr-web.de)
Date: 05/10/04
- Next message: Kris Kennaway: "Re: next stable release date?"
- Previous message: Simon Barner: "Re: How to safely delete a Symlink"
- In reply to: Ditch Brodie: "How to safely delete a Symlink"
- Next in thread: Per Hedeland: "Re: How to safely delete a Symlink"
- Reply: Per Hedeland: "Re: How to safely delete a Symlink"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 10 May 2004 02:42:44 +0200
Ditch Brodie wrote:
> Sorry about this group, but I'm at my ends here. Please review my previous
> post on this from 4/27/2004. Again, so many things said but yet nothing
> confirms, answers or even hints at the correct answer...
>
> I create a sym link like this:
>
> ln -s /usr/share/docs /html/FreeBSD-Documents
>
> Then later when I go to remove the symlink with:
>
> rm -r /html/FreeBSD-Documents
>
> the /usr/share/docs folder gets erased. Please guys don't get me wrong, but
> my previous post said I've asked this question of the group before and all
> the happens are a bunch of responses which basically say try what I've
> already tried. For the hard of hearing...
>
> IF I TYPE
>
> rm -r /html/FreeBSD-Documents
>
> THE WHOLE DAMN DIRECTORY THAT THE LINK POINTS TO WILL BE DESTROYED. PLEASE
> DO NOT REPLY TO THIS IF ALL YOU'RE GOING TO SUGGEST IS THAT THIS SHOULDN'T
> ERASE THE FOLDER THAT THE LINK POINTS TO BECAUSE IT DOES. I'VE TRIED IT A
> DOZEN TIMES AND EACH TIME THE FOLDER I WANT TO KEEP GETS WHACKED ALONG WITH
> THE LINK.
>
> Any new suggestions are welcomed.
That's normal. You'll have to delete a link using:
rm /html/FreeBSD-Documents
Using
rm -r /html/FreeBSD-Documents
will in all cases erase the directory the link points to. Why?
Because you advised rm to recurse trough the whole directory tree
given as argument. And this is just like
cd /html/FreeBSD-Documents
Aint you are awaiting this to work? Yes. You do! If you didn't what
would be a link for? Useless if pointing to a directory!
-- Thomas
- Next message: Kris Kennaway: "Re: next stable release date?"
- Previous message: Simon Barner: "Re: How to safely delete a Symlink"
- In reply to: Ditch Brodie: "How to safely delete a Symlink"
- Next in thread: Per Hedeland: "Re: How to safely delete a Symlink"
- Reply: Per Hedeland: "Re: How to safely delete a Symlink"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|