delete symbolic link
When using the rm or unlink command to remove a symbolic link to a directory, make sure you don’t end the target with a ‘/’ character because it will create an error. Example:
$ mkdir dirtest
$ ln -s dirtest lntest
$ rm lntest/
rm cannot remove directory ‘lntest/’ : Is a directory
$ unlink lntest/
unlink: cannot unlink ‘lntest/’: Not a directory
$ unlink lntest
Recent Comments