LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I remove symbolic links? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-remove-symbolic-links-436542/)

MichaelZ 04-18-2006 06:20 PM

How can I remove symbolic links?
 
Hello,

I would like to know how can I remove symbolic link, e.g.,

Quote:

ln -s /usr/local/bin/ccache /usr/local/bin/g++
Thank you very much.

Best wishes,
Michael

rkelsen 04-18-2006 06:26 PM

rm /usr/local/bin/g++

Poetics 04-18-2006 06:32 PM

Removing the symbolic link (the linkfile itself) just removes that link and not the file it's linked to, for the record. You can safely use "rm" (or as safe as 'rm' ever is) to remove that linkfile, as rkelsen pointed out above.

MichaelZ 04-19-2006 04:32 AM

Hello,

Thank you very much for your help :).

Best wishes,
Michael

s2cuts 10-07-2009 10:28 PM

I was just experiencing a little trip up with this that wasn't intuitive to me. Maybe others that come across this thread may be like me.

When removing a sym-link, remember that your dealing with a file! A sym-link that points to a directory will auto fill with a backslash at the end, which is not what you want when removing it. If you're deleting a sym-link that refers to a directory, and you use auto complete to finish naming the link, remember to remove the trailing backslash.

damgar 11-19-2009 07:45 AM

That was good to know. It just helped me to clarify as well. Thank you.


All times are GMT -5. The time now is 05:27 AM.