Re: rm symlink removes the target

Leonardo Milano <[email protected]>
Newsgroups gmane.comp.gnu.fileutils.bugs
Message-ID <[email protected]>
Hi again

I have additional info on the report. 

> If I do "rm -i symbolic_link_name", it goes to the
> directory to which the symlink points to and asks
> me to delete each file.

The problem occurs _only_ if I end the symbolic name with
a trailing backslash "/". In this case, rm tries to
remove the directory to which "symbolic_link_name" points.
If I DO NOT add the trayling backslash, it removes the
link. If this is the expected behavior, I find it a little
dangerous, since a shell script trying to delete 
a symbolic linke may end up deleting a whole partition

Anyway, thanks a lot
-- Leo

> Dear fileutils maintainers
> 
> I recently upgraded my distro to Mandrake 9.0, which comes
> with fileutils-4.1.11-5mdk 
>  
> I systematically have a problem removing symbolic links
> If I do "rm -i symbolic_link_name", it goes to the
> directory to which the symlink points to and asks
> me to delete each file.
> 
> I understand from the docs that rm is still supposed to
> remove the link, not the target. 
> 
> Is that an unreported change in behavior or a bug ?.
> If it's a bug, I would be very happy to give you
> any more info as you need it
> 
> Many many thanks for suck wonderful utils
> -- leo
> 
> -----------------------------------------------------
>   Leonardo J. Milano
>   Bartol Research Institute, University of Delaware      
>   217 Sharp Lab., Newark, DE 19716, USA       
>   Tel: +1 302.831.1579  * [email protected]        
>   Fax: +1 302.831.1843  *  http://udel.edu/~lmilano/
> -----------------------------------------------------
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.