title: Can I extract files from one tarball directly into a new one?
body: <p>I am working on a high performance computing cluster and for reasons I won't explain here they like us to send ONE file back and forth over the NFS. My jobs use data generated from previous jobs and rely on the working directory's structure. I have all previous results tar'd up in <code>data.tar</code>.</p>
  
  <p>I need to extract the directories from <code>data.tar</code> that will be used in the next job and send them to the compute node from the login node, as a new tarball if possible. Is there a way that I can basically pipe the <code>tar -xvf dir1/dir1.1 dir3/dir3.1</code> output stream directly to a new <code>tar -cvf</code> command?</p>
  
  <p>Alternatively, can I pipe the results of the first extraction directly to the local node's <code>/scratch</code> dir using a pipe that would behave as a single I/O activity and effectively act as if a single file were being written across the NFS?</p>
  
  <p>Thanks in advance. Let me know if I can be more clear with regard to my needs.</p>