LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't Delete Directory SymLink (http://www.linuxquestions.org/questions/linux-newbie-8/cant-delete-directory-symlink-507684/)

Luvz2Fly 12-05-2006 01:37 PM

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)

acid_kewpie 12-05-2006 01:40 PM

remove the trailing "/" with it, it's used as a directory, without it, it's a symlink.

Luvz2Fly 12-05-2006 01:45 PM

Don't I feel like the lazy idiot for using AUTO COMPLETE
That did it - Thanks so much!!


All times are GMT -5. The time now is 12:37 PM.