GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Question to unix/server gurus. (https://gfy.com/showthread.php?t=1052468)

Just Alex 01-05-2012 10:55 AM

Question to unix/server gurus.
 
Is there way to virtually mirror one directory with contents of another.
What i mean is lets say i have directory html/dir-1/ with bunch of files. I want to create html/dir-2/ that mirrors contents of dir-1 with out physically copying files in to it.
I remember seeing something like that before.

mikesouth 01-05-2012 11:22 AM

a simple link will do it without copying the files BUT it isnt useful as a back up or anything think of it as just a pointer to the original dir.

I can think of several way to dynamically create a duplicate of a directory...a cron job or even a simple shell script to copy/delete/rename files

Aric 01-05-2012 11:22 AM

from the html/ directory:

ln -s dir-1 dir-2

http://www.tech-recipes.com/rx/172/c...solaris_linux/

Just Alex 01-05-2012 11:26 AM

Thanks.
No, going to give it a try.
Mike, yes, thats what I needed, a pointer. Just didn't phrase it right.

webair 01-05-2012 11:43 AM

Yes its possible, its called a 'Symbolic link' or symlink
you can create one in unix using the 'ln' command, or you can ask your host to create it for you


All times are GMT -7. The time now is 06:12 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123