<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: tar -xf in new directory in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581521#M60397</link>
    <description>&lt;!--!*#--&gt;&amp;gt; I just realized that it remember it old&lt;BR /&gt;&amp;gt; source/out directory.  [...]&lt;BR /&gt;&lt;BR /&gt;It did?  I don't see why it would, _if_ you&lt;BR /&gt;created the "tar" archive the way you said&lt;BR /&gt;that you did.  &lt;BR /&gt;&lt;BR /&gt;      tar tfv bills.tar&lt;BR /&gt;&lt;BR /&gt;&amp;gt; What is the trick here, [...]&lt;BR /&gt;&lt;BR /&gt;It should work as desired if you specify a&lt;BR /&gt;relative path, not an absolute path, when&lt;BR /&gt;you create the archive.&lt;BR /&gt;&lt;BR /&gt;   Relative (often good):&lt;BR /&gt;      cd /source/out&lt;BR /&gt;      tar cf /bills.tar gm_*.zip&lt;BR /&gt;&lt;BR /&gt;   Absolute (often bad):&lt;BR /&gt;      tar cf /bills.tar /source/out/gm_*.zip&lt;BR /&gt;&lt;BR /&gt;GNU "tar" also offers some options which&lt;BR /&gt;allow the user to modify/transform the paths&lt;BR /&gt;when files are extracted.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/tar/manual/" target="_blank"&gt;http://www.gnu.org/software/tar/manual/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/tar/manual/html_node/transform.html#SEC108" target="_blank"&gt;http://www.gnu.org/software/tar/manual/html_node/transform.html#SEC108&lt;/A&gt;</description>
    <pubDate>Wed, 10 Feb 2010 20:08:13 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2010-02-10T20:08:13Z</dc:date>
    <item>
      <title>tar -xf in new directory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581520#M60396</link>
      <description>Hi, all&lt;BR /&gt;Having problems tar -x archive in new directory.&lt;BR /&gt;&lt;BR /&gt;I created tar file like this:&lt;BR /&gt;cd /source/out&lt;BR /&gt;tar -cvf bills.tar  gm_*.zip&lt;BR /&gt;&lt;BR /&gt;then copied it to new /gm/webserver dir and tried to exract all files being there, and I just realized that it remember it old source/out directory. Nothing extracted.&lt;BR /&gt; Tried this:&lt;BR /&gt;tar -C /gm/webserver/ -xvvf bills.tar&lt;BR /&gt;&lt;BR /&gt;and still verbose output shows that it points to old /source/out/gm_01.zip path.&lt;BR /&gt;and nothing was extracted to /gm/webserver/.&lt;BR /&gt;&lt;BR /&gt;What is the trick here, do I need to use any special option while creating tar -cf ? &lt;BR /&gt;&lt;BR /&gt;Tx to all&lt;BR /&gt;Jian&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Feb 2010 17:40:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581520#M60396</guid>
      <dc:creator>JianW</dc:creator>
      <dc:date>2010-02-10T17:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: tar -xf in new directory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581521#M60397</link>
      <description>&lt;!--!*#--&gt;&amp;gt; I just realized that it remember it old&lt;BR /&gt;&amp;gt; source/out directory.  [...]&lt;BR /&gt;&lt;BR /&gt;It did?  I don't see why it would, _if_ you&lt;BR /&gt;created the "tar" archive the way you said&lt;BR /&gt;that you did.  &lt;BR /&gt;&lt;BR /&gt;      tar tfv bills.tar&lt;BR /&gt;&lt;BR /&gt;&amp;gt; What is the trick here, [...]&lt;BR /&gt;&lt;BR /&gt;It should work as desired if you specify a&lt;BR /&gt;relative path, not an absolute path, when&lt;BR /&gt;you create the archive.&lt;BR /&gt;&lt;BR /&gt;   Relative (often good):&lt;BR /&gt;      cd /source/out&lt;BR /&gt;      tar cf /bills.tar gm_*.zip&lt;BR /&gt;&lt;BR /&gt;   Absolute (often bad):&lt;BR /&gt;      tar cf /bills.tar /source/out/gm_*.zip&lt;BR /&gt;&lt;BR /&gt;GNU "tar" also offers some options which&lt;BR /&gt;allow the user to modify/transform the paths&lt;BR /&gt;when files are extracted.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/tar/manual/" target="_blank"&gt;http://www.gnu.org/software/tar/manual/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/tar/manual/html_node/transform.html#SEC108" target="_blank"&gt;http://www.gnu.org/software/tar/manual/html_node/transform.html#SEC108&lt;/A&gt;</description>
      <pubDate>Wed, 10 Feb 2010 20:08:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581521#M60397</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-02-10T20:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: tar -xf in new directory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581522#M60398</link>
      <description>&amp;gt;Tried this: tar -C /gm/webserver/ -xvf bills.tar&lt;BR /&gt;&lt;BR /&gt;-C is what you use when creating the tarfile.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;do I need to use any special option while creating tar -cf&lt;BR /&gt;&lt;BR /&gt;You either need to be in that directory as Steven said, or you can use -C:&lt;BR /&gt;tar -cvf bills.tar -C /source/out .&lt;BR /&gt;(Note: that "*" won't work because you aren't in that directory yet.)</description>
      <pubDate>Sun, 14 Feb 2010 09:30:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581522#M60398</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-02-14T09:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: tar -xf in new directory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581523#M60399</link>
      <description>This is from the man page.&lt;BR /&gt;&lt;BR /&gt;Archive all files and directories in directory my_project in the&lt;BR /&gt;      current directory to a file called my_project.TAR, also in the current&lt;BR /&gt;      directory:&lt;BR /&gt;&lt;BR /&gt;           tar -cvf my_project.TAR my_project&lt;BR /&gt;&lt;BR /&gt;sp,</description>
      <pubDate>Thu, 18 Feb 2010 23:03:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/tar-xf-in-new-directory/m-p/4581523#M60399</guid>
      <dc:creator>Sp4admin</dc:creator>
      <dc:date>2010-02-18T23:03:01Z</dc:date>
    </item>
  </channel>
</rss>

