<?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 - simple extraction in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071916#M438869</link>
    <description>so how was the tarball created? using absolute paths?&lt;BR /&gt;do a tar tvf tarfilename to see.&lt;BR /&gt;If so, you will need to use pax to extract it to a new directory&lt;BR /&gt;</description>
    <pubDate>Tue, 02 Oct 2007 08:30:46 GMT</pubDate>
    <dc:creator>melvyn burnard</dc:creator>
    <dc:date>2007-10-02T08:30:46Z</dc:date>
    <item>
      <title>TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071914#M438867</link>
      <description>My brain is full of mush today.. &lt;BR /&gt;&lt;BR /&gt;I am extracting a tar file, &lt;BR /&gt;&lt;BR /&gt;I am using &lt;BR /&gt;"tar -xvf tarfilename" &lt;BR /&gt;&lt;BR /&gt;it extracts files to the original location. &lt;BR /&gt;&lt;BR /&gt;I want to extract files to a CWD. &lt;BR /&gt;&lt;BR /&gt;Should the syntax be something like such? &lt;BR /&gt;&lt;BR /&gt;"tar -xvf tarfilename newdir" &lt;BR /&gt;or &lt;BR /&gt;"tar -xvf tarfilename . " &lt;BR /&gt;&lt;BR /&gt;For some reason the pathing in the tar file pushed files to a file system I have watch fairly closely for disk space, I'd prefer to extract to another location. &lt;BR /&gt;&lt;BR /&gt;Any quick insight deeply appreciated. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Oct 2007 08:21:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071914#M438867</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2007-10-02T08:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071915#M438868</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you can move the tar archive where you  want to extract the files and then just to execute&lt;BR /&gt;&lt;BR /&gt;tar -xf tarfilename&lt;BR /&gt;&lt;BR /&gt;in this directory</description>
      <pubDate>Tue, 02 Oct 2007 08:29:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071915#M438868</guid>
      <dc:creator>Delcho Tuhchiev</dc:creator>
      <dc:date>2007-10-02T08:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071916#M438869</link>
      <description>so how was the tarball created? using absolute paths?&lt;BR /&gt;do a tar tvf tarfilename to see.&lt;BR /&gt;If so, you will need to use pax to extract it to a new directory&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Oct 2007 08:30:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071916#M438869</guid>
      <dc:creator>melvyn burnard</dc:creator>
      <dc:date>2007-10-02T08:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071917#M438870</link>
      <description>Hi Rex,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;there is a terrible hack:&lt;BR /&gt;First, cd to the direcotry, to which you want to extract.&lt;BR /&gt;However, the command below will restore the only the basename of the selected files:&lt;BR /&gt;&lt;BR /&gt;$ pax -rv -s'/^\///' &amp;lt;  tarfilename.tar&lt;BR /&gt;&lt;BR /&gt;Perhaps other members have better - and not so quick - insights!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Tue, 02 Oct 2007 08:36:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071917#M438870</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2007-10-02T08:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071918#M438871</link>
      <description>mel, &lt;BR /&gt;&lt;BR /&gt;the original tar command to create the archive is full path to our db export locations. &lt;BR /&gt;&lt;BR /&gt;/mount/export/dbs/dbname/ &lt;BR /&gt;</description>
      <pubDate>Tue, 02 Oct 2007 08:36:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071918#M438871</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2007-10-02T08:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071919#M438872</link>
      <description>so, tar was done with full or absolute path naming.&lt;BR /&gt;You need to look at using pax to extract the files to another directory.&lt;BR /&gt;man pax&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;To read the archive a.pax, with all files rooted in the directory /usr&lt;BR /&gt;      in the archive extracted relative to the current directory, enter:&lt;BR /&gt;&lt;BR /&gt;           pax -r -s ',//*usr//*,,' -f a.pax</description>
      <pubDate>Tue, 02 Oct 2007 08:37:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071919#M438872</guid>
      <dc:creator>melvyn burnard</dc:creator>
      <dc:date>2007-10-02T08:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071920#M438873</link>
      <description>&amp;gt; the original tar command to create the&lt;BR /&gt;&amp;gt; archive is full path to our db export&lt;BR /&gt;&amp;gt; locations.&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; /mount/export/dbs/dbname/&lt;BR /&gt;&lt;BR /&gt;I trust that it's now clear why this was&lt;BR /&gt;probably unwise.&lt;BR /&gt;&lt;BR /&gt;"pax" offers that "-s" option already&lt;BR /&gt;mentioned.  GNU "tar" offers&lt;BR /&gt;"--strip-components=number" and&lt;BR /&gt;"--transform=sed-expr" (sounds like pax's&lt;BR /&gt;"-s"), either of which can help in this&lt;BR /&gt;situation.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/tar/" target="_blank"&gt;http://www.gnu.org/software/tar/&lt;/A&gt;</description>
      <pubDate>Tue, 02 Oct 2007 08:49:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071920#M438873</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-10-02T08:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071921#M438874</link>
      <description>Mel &lt;BR /&gt;&lt;BR /&gt;in your scenario:&lt;BR /&gt;pax -r -s ',//*usr//*,,' -f a.pax&lt;BR /&gt;&lt;BR /&gt;If I modify this command to reflect &lt;BR /&gt;&lt;BR /&gt;Say for example&lt;BR /&gt;&lt;BR /&gt;pax -r -s ',//*exportfs//*,,' -f tarfile.tar &lt;BR /&gt;&lt;BR /&gt;should take any files in the tarfile.tar and string off the leading exportfs? I have a deeply embedded directory structure.. &lt;BR /&gt;&lt;BR /&gt;/exportfs/dbexport/onconfig.pei/distname/dbname.exp/  &lt;BR /&gt;&lt;BR /&gt;How will that effect the result of the pax command ? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:05:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071921#M438874</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2007-10-02T09:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071922#M438875</link>
      <description>&amp;gt;pax -r -s ',//*exportfs//*,,' -f tarfile.tar &lt;BR /&gt;&lt;BR /&gt;&amp;gt;should take any files in the tarfile.tar and string off the leading exportfs? I have&lt;BR /&gt;&amp;gt; a deeply embedded directory structure.. &lt;BR /&gt;&lt;BR /&gt;&amp;gt;/exportfs/dbexport/onconfig.pei/distname/dbname.exp/ &lt;BR /&gt;&lt;BR /&gt;&amp;gt;How will that effect the result of the pax command ?&lt;BR /&gt;&lt;BR /&gt;Are you trying to remove the leading "/exportfs" string and then extracting the tar archive to the current working directory with the rest of the path intact viz.,&lt;BR /&gt;&lt;BR /&gt;# pax -v -r -f tarfile.tar -s?/exportfs/??g&lt;BR /&gt;&lt;BR /&gt;strips off the leading "/exportfs/" string and extracts the remaining path name i.e. "dbexport/onconfig.pei/distname/dbname.exp/" in the CWD. Is that what you want?</description>
      <pubDate>Tue, 02 Oct 2007 12:24:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071922#M438875</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-10-02T12:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071923#M438876</link>
      <description>Sandman, yes, I want to extract the contents in current working and not put to the /exportfs/ mount point. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Oct 2007 12:38:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071923#M438876</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2007-10-02T12:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071924#M438877</link>
      <description>Just to explain the problem, basic tar CANNOT restore to a different directory if the first character in the name of each file is: /&lt;BR /&gt; &lt;BR /&gt;The / is the absolute pathname and tar has no options to restore that file to another location. Now there are tar enhancements such as gtar that do indeed have (non-standard) options to allow for this and if you must stay with tar, then downloading a copy of gtar is worth the effort. Be sure that you don't install gtar so it replaces /usr/bin/tar. You need to maintain each program separately.</description>
      <pubDate>Tue, 02 Oct 2007 12:39:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071924#M438877</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2007-10-02T12:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071925#M438878</link>
      <description>I would advise using pax, as it gives much more flexibility, and in fact as of HP-UX 11.31 HP recommend  this command due to the portability, and also (off topic) fbackup/frecover are being obsoleted&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Oct 2007 12:42:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071925#M438878</guid>
      <dc:creator>melvyn burnard</dc:creator>
      <dc:date>2007-10-02T12:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: TAR - simple extraction</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071926#M438879</link>
      <description>Thanks All, I will look into Pax a bit closer and GTAR.. &lt;BR /&gt;&lt;BR /&gt;Thanks All.</description>
      <pubDate>Tue, 02 Oct 2007 12:46:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-simple-extraction/m-p/5071926#M438879</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2007-10-02T12:46:51Z</dc:date>
    </item>
  </channel>
</rss>

