title: untar tar file using --strip-components=1
body: <p>I have a tar file which has multiple folders like this:</p>
  
  <pre><code>code.tar
    bin/
      startup.sh
    WebServer/
      appname
      webappname
    Configuration/
      a.properties
      b.properties
  </code></pre>
  
  <p>If I unzip code.tar, I get a folder name <code>code</code> with all the folder structure under it, but I want to extract the contents of <code>code.tar</code> and just get the sub-folder structure under it (ie <code>bin/</code>, <code>WebServer/</code>, <code>configuration/</code> and files in these folders).</p>
  
  <p>When I use <code>tar -xzf code.tar -C &lt;path&gt; --strip-components=1</code> I get all the contents of subfolders ie <code>startup.sh</code>,<code>appname</code> etc along with the sub-folders-</p>
  
  <p>eg on running above command I get all these folders and files at same level-</p>
  
  <pre><code>bin/
  startup.sh
  WebServer/
  appname
  webappname
  Configuration/
  a.properties
  b.properties
  </code></pre>
  
  <p>please help</p>