sanctus Posted May 5, 2011 Report Posted May 5, 2011 LOL, I was trying out to link a directory so I did sandros@??? ln -s convert_tries/ link2convert Seen that it works then I wanted to remove the link and what I did is: sandros@??? ~> rm -r link2convert/rm: cannot remove directory `link2convert/': Not a directorysandros@??? ~> rm link2convert/rm: cannot remove `link2convert/': Is a directory Actually I thought it is only fun, but now I wonder how do I delete the link only, with rm link2convert/* ? Or does that actually delete the conent of convert_tries/ ? Quote
alexander Posted May 5, 2011 Report Posted May 5, 2011 add an f to it... f stands for just fucking do it, so i can forget about it.... Quote
alexander Posted May 5, 2011 Report Posted May 5, 2011 also i link directories and files all the time. Oh oh major mistake, take the r out! use an rm -f like this:mkdir testln -s test test2touch test/als testrm -f test2ls test doooone Quote
sanctus Posted May 6, 2011 Author Report Posted May 6, 2011 Ok it works, but the force option is not soo strong because to be sure (and see what touch test/a does) I tried your example. sandros@??? ~> rm -f test/rm: cannot remove `test/': Is a directory -r though did the job. And btw, THANKS! :-) Quote
C1ay Posted May 7, 2011 Report Posted May 7, 2011 Drop the trailing slash, just use rm linkname Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.