LinuxQuestions.org
Review your favorite Linux distribution.
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 12-05-2006, 12:37 PM   #1
Luvz2Fly
LQ Newbie
 
Registered: Aug 2005
Location: Florida
Distribution: Fedora, CentOS
Posts: 15

Rep: Reputation: 0
Angry Can't Delete Directory SymLink


Help!

I created a symlink to a directory and that seemed to make bad things happen

Starting from From inside: /var/www/vhost/domain-2.com/httpdocs

>> ln-s /var/www/vhost/domain-1.com/httpdocs/images .


I wanted to share images between 2 virtual domains so i created a symlink from one image directory to another - when I try and delete it I get conflicting errors:


rm images/
rm: cannot remove directory `images/': Is a directory

rm -rf images/
rm: cannot remove `images/': Not a directory

rmdir images/
rmdir: `images/': Not a directory

mv images/ images2
mv: cannot move `images' to `images2': Not a directory

Then I tried this for fun...
mkdir blarg
mv blarg/ images/
(NO ERRORS REPORTED - But 'ls' showed no change)

Then I deleted all images in main directory and tried to delete link - still nothing


I Quit!
(I am Using Red Hat)

Last edited by Luvz2Fly; 12-05-2006 at 12:39 PM.
 
Old 12-05-2006, 12:40 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
remove the trailing "/" with it, it's used as a directory, without it, it's a symlink.
 
Old 12-05-2006, 12:45 PM   #3
Luvz2Fly
LQ Newbie
 
Registered: Aug 2005
Location: Florida
Distribution: Fedora, CentOS
Posts: 15

Original Poster
Rep: Reputation: 0
Don't I feel like the lazy idiot for using AUTO COMPLETE
That did it - Thanks so much!!
 
  


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
symlink directory eats files silindrin Debian 3 03-13-2006 08:28 AM
symlink home-directory? SteQve Linux - General 2 01-26-2006 04:42 PM
how to remove a symlink without deleting the destination directory Snerkel Linux - Software 3 01-20-2005 11:47 AM
symlink multiple files to new directory with new extension jmanjohn61 Linux - General 1 01-06-2005 12:55 PM
moving a symlink in a directory e1000 Linux - General 2 02-23-2004 05:09 PM


All times are GMT -5. The time now is 04:51 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration