title: cp --parents option on mac
body: <p>On Linux, I have a --parents option available for the cp command so I can do </p>
  
  <pre><code>cp --parents test/withintest/go.rb test2
  </code></pre>
  
  <p><a href="http://www.gnu.org/software/coreutils/manual/html_node/cp-invocation.html">http://www.gnu.org/software/coreutils/manual/html_node/cp-invocation.html</a></p>
  
  <p>On Mac, I do not have this option available. Is there a way to do this on Mac? Why is this option not available?</p>
  
  <p>PS. The purpose of --parents is the following:</p>
  
  <blockquote>
    <p>‘--parents’ Form the name of each destination file by appending to the
    target directory a slash and the specified name of the source file.</p>
    
    <p>The last argument given to cp must be the name of an existing
    directory. </p>
    
    <p>For example, the command:</p>
  
  <pre><code>      cp --parents a/b/c existing_dir 
  </code></pre>
    
    <p>copies the file a/b/c to existing_dir/a/b/c, creating any missing intermediate directories.</p>
  </blockquote>