LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 09:47 AM   #1
Ezplan
Member
 
Registered: Dec 2003
Location: MA
Distribution: CentOS 6.8 & 7, Linux Mint
Posts: 66
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, 09:52 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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, 10:00 AM   #3
Ezplan
Member
 
Registered: Dec 2003
Location: MA
Distribution: CentOS 6.8 & 7, Linux Mint
Posts: 66

Original Poster
Blog Entries: 1

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



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 08:45 PM
How to remove a symbolic link? thomas2004ch Linux - Newbie 4 08-05-2009 05:25 AM
How to remove a symbolic link without deleting the file rhbegin Fedora 4 10-10-2007 10:38 AM
Is there a way to remove a symbolic link Philter Linux - Newbie 3 11-30-2004 06:24 PM
Can't remove symbolic link kimchee411 Linux - Newbie 1 10-06-2004 02:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:53 PM.

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
Open Source Consulting | Domain Registration