LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   stop rm following links (https://www.linuxquestions.org/questions/ubuntu-63/stop-rm-following-links-4175677142/)

CollieJim 06-16-2020 03:18 AM

stop rm following links
 
When I try to use rm to delete a soft link, it wants to delete the target directory.

How do I stop that?

ehartman 06-16-2020 04:09 AM

Quote:

Originally Posted by CollieJim (Post 6134857)
When I try to use rm to delete a soft link, it wants to delete the target directory.

Don't use a trailing /
So "rm link_file" will remove the link itself, but "rm link-file/" will try to remove what it is pointing TO.


All times are GMT -5. The time now is 03:45 PM.