title: How to strip path while archiving with TAR
body: <p>I have a file that contain list of files I want to archive with tar.
  Let's call it <code>mylist.txt</code></p>
  
  <p>It contains:</p>
  
  <pre><code>/path1/path2/file1.txt
  /path1/path2/file3.txt
  ...
  /path1/path2/file10.txt
  </code></pre>
  
  <p>What I want to do is to archive this file into a tarball but excluding <code>/path1/path2/</code>.
  Currently by doing this:</p>
  
  <pre><code>tar -cvf allfiles.tar -T mylist.txt
  </code></pre>
  
  <p>preserves the path after unarchiving.</p>
  
  <p>I tried this but won't work too:</p>
  
  <pre><code>tar -cvf -C /path1/path2 allfiles.tar -T mylist.txt
  </code></pre>
  
  <p>It archives all the files in <code>/path1/path2</code> even those which are not in mylist.txt</p>
  
  <p>Is there a way to do it?</p>