I just recently upgraded my hosting plan to include sub domains, shell access and a few other goodies. My original site had all of the images in an images directory. To avoid copying all of the images to each new sub domain/directory I created an images directory for each sub directory and ran ln *.* /path/to/sub/images from within the real images directory. This worked great but is it only a one shot deal? I.E. if I add another image to the main directory do I need to run ln again? Server is FreeBSD 4.7 with Apache/1.3.27 I didnt try hard linking the directories since my books say that you need to be root to do so but I think that is what I really needed. Thank you, ~ Michael LaPointe
On Sat, 21 Dec 2002, Michael LaPointe wrote:
My original site had all of the images in an images directory. To avoid copying all of the images to each new sub domain/directory I created an images directory for each sub directory and ran ln *.* /path/to/sub/images from within the real images directory.
This worked great but is it only a one shot deal? I.E. if I add another image to the main directory do I need to run ln again?
Michael, What you have created in each directory is an images directory populated with links. As you supposed, each time you add something to the "real" images directory, you have to add links to it everywhere. Here's a more efficient approach. 1) get rid of all these directories of links and 2) in each site directory, make single link to the "real" images directory (not to the images themselves). For example, cd <site_directory> ln -s <path_to_images_directory> images That's it. You won't have to worry about maintaining links to the individual files. Hope this helps. Bill
participants (2)
-
Bill Mills-Curran
-
Michael LaPointe