<?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: Tarring - Relative &amp;amp; Absolute in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271077#M674902</link>
    <description>&amp;gt; [...]  | compress [...]&lt;BR /&gt;&lt;BR /&gt;Why not gzip?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; What tar options are there [...]&lt;BR /&gt;&lt;BR /&gt;Which "tar" program are you using?  GNU "tar"&lt;BR /&gt;offers more than the stock HP-UX "tar".&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;&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/tar.html#SEC108" target="_blank"&gt;http://www.gnu.org/software/tar/manual/tar.html#SEC108&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;A Forum search would probably have found all&lt;BR /&gt;this, too, of course.</description>
    <pubDate>Wed, 17 Sep 2008 16:16:15 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2008-09-17T16:16:15Z</dc:date>
    <item>
      <title>Tarring - Relative &amp; Absolute</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271073#M674898</link>
      <description>Dear All,&lt;BR /&gt;&lt;BR /&gt;You know when you tar a directory -- say &lt;BR /&gt;&lt;BR /&gt;tar cvf - /opt/myfiles/ourfiles/everyonesfiles/ | compress &amp;gt; files.tar.Z&lt;BR /&gt;&lt;BR /&gt;How do I un-tar this so that it untars this archive within a directory, so that it doesn't tar it from the absolute path.&lt;BR /&gt;&lt;BR /&gt;Sorry.. im not sure if that was clear.. but you must get the picture?? If I untar all that.. it will untar everything in my root dir.&lt;BR /&gt;&lt;BR /&gt;But, let's say I wanted it to be untarr'd in my /export/home/user_admin/ directory??&lt;BR /&gt;&lt;BR /&gt;i.e. it would be /export/home/user_admin/opt/myfiles... etc..&lt;BR /&gt;&lt;BR /&gt;What tar options are there to make sure I can do that?&lt;BR /&gt;Many thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Sep 2008 13:38:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271073#M674898</guid>
      <dc:creator>Vassilios</dc:creator>
      <dc:date>2008-09-17T13:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Tarring - Relative &amp; Absolute</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271074#M674899</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You should use relative paths when making 'tar' archives.  When confronted with extracting an archive made with absolute paths, use 'pax'.&lt;BR /&gt;&lt;BR /&gt;For example, had I made a 'tar' archive of '/tmp/dummydir' with absolute paths but wanted to extract the contents into '/var/tmp' instead, I could do:&lt;BR /&gt;&lt;BR /&gt;# tar -cvf /tmp/dummydir /tmp/myarchive&lt;BR /&gt;# cd /var/tmp;&lt;BR /&gt;# pax -r -s ',/tmp/,,' /tmp/myarchive&lt;BR /&gt;&lt;BR /&gt;See the 'pax' manpages.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Sep 2008 13:47:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271074#M674899</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-17T13:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Tarring - Relative &amp; Absolute</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271075#M674900</link>
      <description>Instead of using /opt/myfiles/ourfiles/ereryonesfiles in your tar statement do something like:&lt;BR /&gt;&lt;BR /&gt;# cd/opt/myfiles/ourfiles&lt;BR /&gt;&lt;BR /&gt;# tar cvf - everyonesfiles | compress &amp;gt; files.tar.Z&lt;BR /&gt;&lt;BR /&gt;Then when you extract, the directory everyonesfiles will be created in the directory you are currently in.&lt;BR /&gt;&lt;BR /&gt;If you need the whole /opt/myfiles.... structures, just omit the leading '/' and do:&lt;BR /&gt;&lt;BR /&gt;# cd /&lt;BR /&gt;# tar cvf - opt/myfiles/ourfiles/everyonesfiles/ | compress &amp;gt; files.tar.Z</description>
      <pubDate>Wed, 17 Sep 2008 13:50:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271075#M674900</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2008-09-17T13:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Tarring - Relative &amp; Absolute</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271076#M674901</link>
      <description>Thanks James &amp;amp; patrick.&lt;BR /&gt;&lt;BR /&gt;Yes, patrick has a point, but the files are now tar'd and its too late to re-tar them again.&lt;BR /&gt;(It was a 1 GB tar file! and that was after compression!).&lt;BR /&gt;&lt;BR /&gt;So, i think my best option is to learn about the pax command. &lt;BR /&gt;&lt;BR /&gt;I'll read the man pages right now on pax, but please do not hesitate to save me time on this reading if you know what the syntax is for using the pax command to untar into a particular directory.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 17 Sep 2008 13:57:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271076#M674901</guid>
      <dc:creator>Vassilios</dc:creator>
      <dc:date>2008-09-17T13:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Tarring - Relative &amp; Absolute</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271077#M674902</link>
      <description>&amp;gt; [...]  | compress [...]&lt;BR /&gt;&lt;BR /&gt;Why not gzip?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; What tar options are there [...]&lt;BR /&gt;&lt;BR /&gt;Which "tar" program are you using?  GNU "tar"&lt;BR /&gt;offers more than the stock HP-UX "tar".&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;&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/tar.html#SEC108" target="_blank"&gt;http://www.gnu.org/software/tar/manual/tar.html#SEC108&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;A Forum search would probably have found all&lt;BR /&gt;this, too, of course.</description>
      <pubDate>Wed, 17 Sep 2008 16:16:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271077#M674902</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-09-17T16:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Tarring - Relative &amp; Absolute</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271078#M674903</link>
      <description>&amp;gt;Patrick: Instead of using ...&lt;BR /&gt;# cd /opt/myfiles/ourfiles&lt;BR /&gt;# tar cvf - everyonesfiles | compress &amp;gt; files.tar.Z&lt;BR /&gt;&lt;BR /&gt;You can combine the cd and tar into one and use gzip:&lt;BR /&gt;tar -cvf - -C /opt/myfiles/ourfiles everyonesfiles | gzip &amp;gt; files.tar.gz&lt;BR /&gt;&lt;BR /&gt;&amp;gt;if you know what the syntax is for using the pax command to untar into a particular directory.&lt;BR /&gt;&lt;BR /&gt;JRF showed you the syntax:&lt;BR /&gt;pax -r -s ',/tmp/,,' /tmp/myarchive&lt;BR /&gt;&lt;BR /&gt;Or in your case:&lt;BR /&gt;zcat files.tar.Z | pax -r -v -s ',^/,,'&lt;BR /&gt;This will just remove the leading "/".&lt;BR /&gt;If you want to remove /opt/myfiles/ourfiles/everyonesfiles/, then:&lt;BR /&gt;zcat files.tar.Z | pax -r -v -s ',/opt/myfiles/ourfiles/everyonesfiles/,,'</description>
      <pubDate>Thu, 18 Sep 2008 04:55:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tarring-relative-amp-absolute/m-p/4271078#M674903</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-09-18T04:55:00Z</dc:date>
    </item>
  </channel>
</rss>

