LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2012, 10:47 AM   #1
Ezplan
Member
 
Registered: Dec 2003
Location: MA
Distribution: CentOS 5, Linux Mint
Posts: 58
Blog Entries: 1

Rep: Reputation: 15
Can't remove symbolic link


Hi all,
I know this is supposed to be easy, but I'm having a heck of a time:
Code:
[root@bigpuffin proj]# ls -al
lrwxrwxrwx   1 root     root     12 Jun 15  2011 ZZ_Albatross_Archive -> /projArchive
drwxrwxrwx  29 tplancon users  4096 Feb  8 17:46 ZZ_Proj_Misc
drwxr-xr-x  10 tplancon users  4096 Dec 14  2010 ZZZ_Proj_Dir_24x36Template
drwxr-xr-x  10 tplancon users  4096 Jul  9  2010 ZZZ_Proj_Dir_30x42Template

[root@bigpuffin proj]# rm -f ZZ_Albatross_Archive/
rm: cannot remove `ZZ_Albatross_Archive/': Not a directory
[root@bigpuffin proj]# rm ZZ_Albatross_Archive/
rm: cannot remove directory `ZZ_Albatross_Archive/': Is a directory
[root@bigpuffin proj]# rm -R ZZ_Albatross_Archive/
rm: descend into directory `ZZ_Albatross_Archive/'? y
rm: descend into directory `ZZ_Albatross_Archive//Retail_Lulu_2'? 
"Cancel"
[root@bigpuffin proj]# rm -fR ZZ_Albatross_Archive/
rm: cannot remove `ZZ_Albatross_Archive/': Not a directory
[root@bigpuffin proj]#
Is it a directory or is it not? And what difference does it make!?!
Any suggestions as to why I can't remove this link are greatly appreciated!
Thanks!
 
Old 02-16-2012, 10:52 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,831
Blog Entries: 36

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Because a link isn't a directory it's a file, even if it links to a directory it is still just a link. You need to remove the trailing slash.

Code:
rm ZZ_Albatross_Archive
 
Old 02-16-2012, 11:00 AM   #3
Ezplan
Member
 
Registered: Dec 2003
Location: MA
Distribution: CentOS 5, Linux Mint
Posts: 58
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Thanks sag47!
That is interesting! I was typing in that line using the auto-complete TAB function. Auto-complete automatically places a "/" at the end of the line. I didn't even notice it. Sabotage by auto-complete!
You ARE a wizard!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot remove symbolic link to directory. martint Linux - Newbie 6 09-17-2014 09:45 PM
How to remove a symbolic link? thomas2004ch Linux - Newbie 4 08-05-2009 06:25 AM
How to remove a symbolic link without deleting the file rhbegin Fedora 4 10-10-2007 11:38 AM
Is there a way to remove a symbolic link Philter Linux - Newbie 3 11-30-2004 07:24 PM
Can't remove symbolic link kimchee411 Linux - Newbie 1 10-06-2004 03:25 AM


All times are GMT -5. The time now is 10:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration