title: tar create rename directories
body: <p>I have a directory named <code>dir</code> with files <code>file1</code> <code>file2</code> <code>file3</code> in it and I want to create a gzipped tar directory from it called <code>dir.tar.gz</code> but with the hierarchy as:</p>
  
  <pre><code>anotherdir/file1
  anotherdir/file2
  anotherdir/file3
  </code></pre>
  
  <p>There's always the option of writing a shell script to rename <code>dir</code> to <code>anotherdir</code> then tar it, but I was hoping for a more elegant solution.</p>