[KLUG Members] rm doesn't remove symbolic link to directory?
Steve Petersen
steve.petersen at charter.net
Tue Nov 30 22:36:14 EST 2004
Hi folks,
I know this should be easy. But everywhere I look on the web, I'm told
to remove a symbolic link to a directory (without removing the target)
just by using 'rm'. But when I try it, RH8 asks if I want to remove the
directory, instead of the symbolic link. If I gamely say "yes"
anyway, it starts listing the contents of the target directory, as
though those files really were going to be deleted (I have rm aliased to
'rm -i'). This is enough to scare me. I just want to delete the link!
'unlink' has similarly unpleasant behavior, it seems.
One weird thing: the contents of the symlink's target get listed with
two slashes, like this:
<shell>
[10:29 PM spetey]$ rm notes/
rm: remove directory `notes/'? y
rm: remove symbolic link `notes//index.html'? n
rm: remove write-protected regular file
`notes//class-notes-template.html'? n
rm: remove regular file `notes//intro-notes.html~'? n
rm: remove regular file `notes//intro-notes.html'?
</shell>
What's up? How *do* I delete a symlink to a directory?
Thanks,
Steve
More information about the Members
mailing list