Question to unix/server gurus.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Just Alex
    Liv Benson to You, Bitch
    • Aug 2007
    • 6060

    #1

    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
    Confirmed User
    • Jun 2003
    • 6334

    #2
    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
    Mike South

    It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

    Comment

    • Aric
      Confirmed User
      • Sep 2002
      • 1209

      #3
      from the html/ directory:

      ln -s dir-1 dir-2

      http://www.tech-recipes.com/rx/172/c...solaris_linux/
      Awesome cloud hosting by DigitalOcean

      Comment

      • Just Alex
        Liv Benson to You, Bitch
        • Aug 2007
        • 6060

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

        Comment

        • webair
          Confirmed User
          • Feb 2002
          • 8531

          #5
          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


          ~ Webair Dedicated Cloud Servers™ ~ WEBAIR VSYS™ Virtual Hosting Platform ~ Superior CDN Network ~
          ~ Managed Dedicated hosting Specialists ~ DISCOUNT DOMAIN NAMES! ~ WEBAIR FUSION IO MANAGED CLOUD SERVERS! ~


          ICQ: 243116321 - TWITTER - @WEBAIRINC - E-Mail: [email protected]

          Comment

          Working...