removing a soft link
Hi there,
I made a soft link to my /bin/ directory and now I want to remove it. I created it as follows: ln -s /bin/ binlink neither "rm binlink" nor "unlink binlink" remove it. rm binlink yields the complaint that binlink is a directory, whereas rmdir and unlink say that it is not a Directory and refuse to remove it. What do I do? Also, I am afraid of the sensitivity of the case since binlink is a link to my /bin/ folder. ANy help is greatly appreciated. P.S. I am going through a book on Linux, and I created the link just for testing purposes. |
have you tried using the -rf flag to rm?
Code:
rm -rf |
are you sure this won't remove everything from my /bin/ folder? I have not tried it? I'd rather not take chances and see what happens. what do you think?
P.S. I actually tried rm-r, but not -f. To no avail.... |
Plain old rm should work just fine. Do you perhaps have rm aliased to something strange? Try using a backslash prefix to bypass the alias:
Code:
\rm binlink |
As rknichols says, plain old rm will do it.
But be sure to NOT include the trailing '/' which will trigger the directory warning as it refers to the /bin/ directory itself - and yes rm -rf binlink/ WILL remove everythign from the /bin directory - DON'T DO THAT!. Code:
rm binlink/ - refers to the directory linked, i.e. /bin/ |
:) rm binlink (wiithout the trailing slash worked fine).
I used tab for autocompletion of the link name and it adds the trailing slash, that's why it did not work. Thanks a lot everyone, doughyi8u, rknichols, astrogeek. |
All times are GMT -5. The time now is 05:54 PM. |