Jan 182000

symbolic links which are difficult to remove

From time to time, I’ve had trouble removing a symbolic link.  I’d get this:
# rm nz.freebsd.org.old
rm: nz.freebsd.org.old/: is a directory

I was told to use the full path.  Which I did.  And it worked:

# rm /www/nz.freebsd.org.old

I’m also told that this should also work:

# rm ./nz.freebsd.org.old

Go figure.

  3 Responses to “symbolic links which are difficult to remove”

  1. Then if so, you will remove the target directory 🙁

    You had simply to not add a / at the end of the filename


    Post Edited (20-12-06 18:47)

    • But there is no / at the end of the filename…

      The Man Behind The Curtain

      • Yes, you are right. I think I wanted to say:

        And if you try ‘rm -r’ you should not add the slash, then you can also remove the symlink only.


        rm -r nz.freebsd.org.old

        With FreeBSD 6.1 also the ‘rm nz.freebsd.org.old’ works as expected.