LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   symbolic links (https://www.linuxquestions.org/questions/linux-newbie-8/symbolic-links-734214/)

jjanes 06-19-2009 11:08 AM

symbolic links
 
HI I have a webhosting account the is running linux I believe RedHat but I think the question is generic

Can you have two symbolic links in two different directories called the same thing and point to the same place


An example

Path1=c:/lev1/lev2/lev3/dir1
Path2=c:/lev1/lev2/lev3/dir2

can both dir1 and dir2 have symbolic link called up1 that essentially moves up to lev3 in the directory tree

ln -s ../ up1

I do this because I am hosting multiple websites on a common directory tree and each URL I point to a given directory makes that the base in its own file structure so i create the up1 symbolic link to break out of the directory structure symbolically


In the above example

dir1 and dir2 are two websites that have URLs pointing directly there lev3 contains files that are common to both such as css and js files

I don't see why this wouldn't work.

In the real world it, in fact,does work for the dir1 files but for some reason the files in dir2 which are virtually duplicates of dir1 with only minor changes does like that symbolic link I call up1 which should point to the directory above the base in the tree structure.

Please let me know your thoughts

bigearsbilly 06-19-2009 02:01 PM

yes you can.

why don't you just try it and see?


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