Cannot remove symbolic link to directory.
I have
~/dir1/dir2 and created a symbolic link to dir2: ln -s ~/dir1/dir2 ~/symlink Now I can't remove symlink! I get the errors: $rm symlink/ rm: cannot remove directory 'testsymboliclink/': Is a directory $rmdir symlink/ rmdir: 'testsymboliclink/': Not a directory This is REALLY weird. I even cannot $unlink symlink/ unlink: 'testsymboliclink/': Not a directory I can't even remove the link, if the dir is empty. Please help me... |
Just use the remove dir command for the link dir. I assume that link is in a different dir, so just
rmdir /path/to/where/the/link/is |
I think you dont understand my problem:
When I use rm, it says "Is a directory" When I use rmdir, it says "Not a directory" Thats quite absurd... I've tried to use both relative and absolute paths, none of them works. |
DUDE, its
'rm symlink' (without '/' on the end) |
Ahh, thanks!
That must be the first (and last) disadvantage of _tab-completion_ :-) |
It's all in the completion...
If you do "rm target/", then rm assumes target is a directory without doing any further checking.
Someone should patch rm to remove this stupid behavior... XOX DOM |
Quote:
|
All times are GMT -5. The time now is 03:19 PM. |