title: Recursively symlink directory tree
body: <p>I'm trying to run a recursive symlink from one directory into another:</p>
  
  <pre class="lang-sh prettyprint-override"><code>find data/* -type d -exec ln -s {} current/{} \;
  </code></pre>
  
  <p>With one addition: I need to strip off <code>data/</code> from the prefix.</p>
  
  <p>Running on OS X server (10.8, Mountain Lion)--not all standard GNU commands, like <code>cp -rs</code>, are supported.</p>
  
  <p>What I mean by recursively:</p>
  
  <p><code>data</code> is a list of persistent directories between Laravel releases:</p>
  
  <pre><code>data/
      \ storage/
          - framework/
              - session/
          - app/
          \ logs/
  </code></pre>
  
  <p>They need to map to:</p>
  
  <pre><code>current/
      \ storage/
          - framework
              - session/
          - app/
          - logs/
        # Also in storage, but we do NOT want to persist
          - debugbar/
          - framework/
              - cache/
              - views/
  </code></pre>
  
  <p>Our <code>data</code> directory is will be persistent storage between application launches, as we update our site, while retaining previous versions of the site in the event of rollbacks (<code>current</code> happens to be a softlink to the latest release).</p>
  
  <p>Note: we also have other sites other than Laravel. <code>data</code> is going to be our standard, and we're going to match directory restructure depending on what the site requires for persistence. It won't always be <code>data/storage</code>.</p>