title: How do I create a tar archive that will not expand to a subfolder?
body: <p>I don't want to create a "flat" tarball that has no internal directory structure. But I want the top-level files to be "loose" rather than mirroring the directory structure they were on originally.</p>
  
  <p>Consider:</p>
  
  <pre><code>+ archives
  |
  + data
      |
      + site
          |
          + file1.html
          |
          + subdirectory
                 |
                 + etc...
  </code></pre>
  
  <p>If I <code>cd</code> into <code>archives</code> and create my tar there, eg: <code>tar -czf archive.tgz ../data/site/*</code> when I extract the tarball later it will recreate <code>data/site/...</code> and then I'll have to <code>mv data/site/* ../some/other/dir</code>.</p>
  
  <p>I'd like to be able to just <code>tar -xzf archive.tgz -C ../some/other/dir</code> and have eg file1.html be right there inside <code>../some/other/dir</code>.</p>