| View previous topic :: View next topic |
| Author |
Message |
Kasumi_Ninja Veteran


Joined: 18 Feb 2006 Posts: 1825 Location: The Netherlands
|
Posted: Fri Dec 21, 2007 7:08 pm Post subject: (SOLVED) How do I remove a symbolic link with the cli? |
|
|
I noticed that when I try to remove a symbolic link through the commandline (rm -Rv foo) it tries to delete the linked folder as well. What is the correct procedure to remove symbolic link with the commandline? _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
Last edited by Kasumi_Ninja on Fri Dec 21, 2007 7:35 pm; edited 1 time in total |
|
| Back to top |
|
 |
Naib Advocate


Joined: 21 May 2004 Posts: 3891 Location: UK - Birmingham
|
Posted: Fri Dec 21, 2007 7:10 pm Post subject: |
|
|
ensure there is no trailing "/" at the end _________________
| Quote: | | Voting holds no real power, he who counts the votes has the true power. |
Weaver Projects
whats the difference between 9/11 and a cow?
u stop milking a cow after 10 years |
|
| Back to top |
|
 |
jdmulloy Tux's lil' helper


Joined: 24 Dec 2004 Posts: 139 Location: Massachusetts, USA
|
Posted: Fri Dec 21, 2007 7:14 pm Post subject: Re: How do I remove a symbolic link with the commandline? |
|
|
| Aniruddha wrote: | | I noticed that when I try to remove a symbolic link through the commandline (rm -Rv foo) it tries to delete the linked folder as well. What is the correct procedure to remove symbolic link with the commandline? |
That's probably because you you tell it to delete thing recursively. A symbolic link is just a file so just run this
Otherwise it will go through every folder it finds as well and delete it's contents then delete it. _________________ Joe Mulloy | http://twitter.com/jdmulloy | Ron Paul in 2012! | 5-1-07 | Unban Playfool | Fire your "Too big to fail" bank http://moveyourmoney.info |
|
| Back to top |
|
 |
Kasumi_Ninja Veteran


Joined: 18 Feb 2006 Posts: 1825 Location: The Netherlands
|
Posted: Fri Dec 21, 2007 7:34 pm Post subject: |
|
|
It's actually a combination of both answers
| Code: | # rm -iv packages/
rm: cannot remove `packages/': Is a directory |
| Code: | # rm -iv packages
rm: remove symbolic link `packages'? |
Thanks! _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered |
|
| Back to top |
|
 |
Zepp Veteran


Joined: 15 Mar 2004 Posts: 1246 Location: Ontario, Canada
|
Posted: Fri Dec 21, 2007 9:20 pm Post subject: |
|
|
| The -v just turns on verbose output so it says what is being deleted exactly. and -i switch is the interactive switch, it asks you "are you sure?" about everything first. |
|
| Back to top |
|
 |
Kasumi_Ninja Veteran


Joined: 18 Feb 2006 Posts: 1825 Location: The Netherlands
|
Posted: Fri Dec 21, 2007 9:36 pm Post subject: |
|
|
| Zepp wrote: | | The -v just turns on verbose output so it says what is being deleted exactly. and -i switch is the interactive switch, it asks you "are you sure?" about everything first. |
Yeah I know, I always use these  _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered |
|
| Back to top |
|
 |
|