<?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 question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427015#M1691</link>
    <description>Use tar -exvf, tar restores from you stand point when issueing the extract command.</description>
    <pubDate>Wed, 21 Jun 2000 16:41:39 GMT</pubDate>
    <dc:creator>CHRIS_ANORUO</dc:creator>
    <dc:date>2000-06-21T16:41:39Z</dc:date>
    <item>
      <title>tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427012#M1688</link>
      <description>Hello,&lt;BR /&gt;I have a tar file and would like to restore it.  i use the command tar -xv.  But this tries to restore it to the original location.  Can I tell tar to restore the files to another location (directory) on the system?&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jun 2000 16:18:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427012#M1688</guid>
      <dc:creator>Sanjay Tailor</dc:creator>
      <dc:date>2000-06-21T16:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427013#M1689</link>
      <description>tar -xvC &lt;DIRECTORY&gt; I believe is the option you are looking for.&lt;BR /&gt;&lt;BR /&gt;man tar to find the options you would need&lt;/DIRECTORY&gt;</description>
      <pubDate>Wed, 21 Jun 2000 16:22:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427013#M1689</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2000-06-21T16:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427014#M1690</link>
      <description>Hello,&lt;BR /&gt;That option did not work.  I tried that and looked at the man page and there is no reference to restoring to a specified directory or none that I could find.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jun 2000 16:32:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427014#M1690</guid>
      <dc:creator>Sanjay Tailor</dc:creator>
      <dc:date>2000-06-21T16:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427015#M1691</link>
      <description>Use tar -exvf, tar restores from you stand point when issueing the extract command.</description>
      <pubDate>Wed, 21 Jun 2000 16:41:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427015#M1691</guid>
      <dc:creator>CHRIS_ANORUO</dc:creator>
      <dc:date>2000-06-21T16:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427016#M1692</link>
      <description>If you get a listing of the files, does it show them with absolute pathnames, starting with a slash?  If so, tar will always attempt to restore to original locations.  If the pathnames are relative, ie starting with a dot or filename, the restore begins at the current directory.&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jun 2000 16:45:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427016#M1692</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-06-21T16:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427017#M1693</link>
      <description>Can't be done. Tar will do two(2) things depending on the way the tarball was created.&lt;BR /&gt;Do a "tar -tvf" and capture the output. If the filenames begin ./ , then the restore will be relative to the directory you are in when doing the "un-tar". If the filenames begin with / , then the restore will always be relative to /(root). You can't change this behaviour. Tar is an old utility but useful because all unix OSes have it.&lt;BR /&gt;&lt;BR /&gt;Richard Lathom</description>
      <pubDate>Wed, 21 Jun 2000 16:49:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427017#M1693</guid>
      <dc:creator>Richard Lathom</dc:creator>
      <dc:date>2000-06-21T16:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427018#M1694</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Just as I had surmised.  So, when I create the tar how do I create it to use relative file names?  My tar right now has absolute paths in it.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jun 2000 16:54:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427018#M1694</guid>
      <dc:creator>Sanjay Tailor</dc:creator>
      <dc:date>2000-06-21T16:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427019#M1695</link>
      <description>Hi Sanjay,&lt;BR /&gt;&lt;BR /&gt;Firstly, you can recover your existing tar backups. You can use 'pax'. It can recover absolute tar backups, relatively.&lt;BR /&gt;&lt;BR /&gt;To do you tar back relative do :-&lt;BR /&gt;&lt;BR /&gt;tar cvf /dev/rmt/0m ./etc ./usr&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;tar cvf /dev/rmt/0m .  &lt;BR /&gt;&lt;BR /&gt;which will backup everything from where your current directory is.&lt;BR /&gt;&lt;BR /&gt;The important thing is to being everything with './'&lt;BR /&gt;&lt;BR /&gt;Andy</description>
      <pubDate>Wed, 21 Jun 2000 17:20:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427019#M1695</guid>
      <dc:creator>Andy Monks</dc:creator>
      <dc:date>2000-06-21T17:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427020#M1696</link>
      <description>If the tar file was created with relative pathing (always recommended) then simply go to the directory under which you want teh files restored and use tar xvf.&lt;BR /&gt;&lt;BR /&gt;ex:&lt;BR /&gt;cd /where/I/want/it&lt;BR /&gt;tar vxf /wpath/to/tar/file&lt;BR /&gt;&lt;BR /&gt;If the tar was created using absolute paths, I do not believe there is a way to override it in the tar command.</description>
      <pubDate>Wed, 21 Jun 2000 17:27:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427020#M1696</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-06-21T17:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427021#M1697</link>
      <description>&lt;BR /&gt;Pax command allows conversion of absolute paths to relative paths using -s option. Pax can read tar files.&lt;BR /&gt;&lt;BR /&gt;This is the only way i know in HP-UX...&lt;BR /&gt;&lt;BR /&gt;but in a SCO you can do  tar xvfA. 'A' option converts form absolute to relative paths.&lt;BR /&gt;&lt;BR /&gt;Well, when i must do this in HP-UX i use symbolic links:&lt;BR /&gt;&lt;BR /&gt;if i must restore files under /dir/data:&lt;BR /&gt;&lt;BR /&gt;mv /dir/data /dir/data.o&lt;BR /&gt;mkdir /tmp/data&lt;BR /&gt;ln -s /tmp/data /dir/data&lt;BR /&gt;tar xvf ....&lt;BR /&gt;rm /dir/data&lt;BR /&gt;mv /dir/data.o /dir/data&lt;BR /&gt;&lt;BR /&gt;So i can extract to /tmp.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Jun 2000 08:06:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427021#M1697</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2000-06-22T08:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427022#M1698</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;i think the best solution is to use pax:&lt;BR /&gt;&lt;BR /&gt;pax -rv -s'/^BACKSLASH///' &lt;BR /&gt;This will restore the archive into the current directory (look out for pwd).&lt;BR /&gt;&lt;BR /&gt;I have noticed that the Backslash is not submitted by the reply so i have written it symbolic (BACKSLASH). Of course you must use the Backslash key by entering the command.&lt;BR /&gt;&lt;BR /&gt;Greetings&lt;BR /&gt;&lt;BR /&gt;Andrew</description>
      <pubDate>Thu, 22 Jun 2000 10:02:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427022#M1698</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2000-06-22T10:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427023#M1699</link>
      <description>Did you get the answer to your question about creating tar files with relative pathnames?&lt;BR /&gt;&lt;BR /&gt;You just 'cd' to the directory where you want the tar to begin.  For example, if you have the following:&lt;BR /&gt;&lt;BR /&gt;  /usr/local/bin/etc....&lt;BR /&gt;&lt;BR /&gt;If you want to tar everything in bin, including the bin directory:&lt;BR /&gt;&lt;BR /&gt;  cd /usr/local&lt;BR /&gt;  tar cvf tarfile&lt;BR /&gt;&lt;BR /&gt;The files in the tarfile will look like this:&lt;BR /&gt;&lt;BR /&gt;  bin/script1&lt;BR /&gt;  bin/script2&lt;BR /&gt;  bin/data&lt;BR /&gt;&lt;BR /&gt;...etc&lt;BR /&gt;&lt;BR /&gt;Then you can restore it anywhere you like:&lt;BR /&gt;&lt;BR /&gt;  cd /home/fred&lt;BR /&gt;  tar xvf tarfile&lt;BR /&gt;&lt;BR /&gt;...will create a 'bin' directory under 'fred'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jun 2000 18:41:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427023#M1699</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-06-26T18:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427024#M1700</link>
      <description>Did you get the answer to your question about creating tar files with relative pathnames?&lt;BR /&gt;&lt;BR /&gt;You just 'cd' to the directory where you want the tar to begin.  For example, if you have the following:&lt;BR /&gt;&lt;BR /&gt;  /usr/local/bin/etc....&lt;BR /&gt;&lt;BR /&gt;If you want to tar everything in bin, including the bin directory:&lt;BR /&gt;&lt;BR /&gt;  cd /usr/local&lt;BR /&gt;  tar cvf tarfile&lt;BR /&gt;&lt;BR /&gt;The files in the tarfile will look like this:&lt;BR /&gt;&lt;BR /&gt;  bin/script1&lt;BR /&gt;  bin/script2&lt;BR /&gt;  bin/data&lt;BR /&gt;&lt;BR /&gt;...etc&lt;BR /&gt;&lt;BR /&gt;Then you can restore it anywhere you like:&lt;BR /&gt;&lt;BR /&gt;  cd /home/fred&lt;BR /&gt;  tar xvf tarfile&lt;BR /&gt;&lt;BR /&gt;...will create a 'bin' directory under 'fred'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jun 2000 18:46:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2427024#M1700</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-06-26T18:46:29Z</dc:date>
    </item>
  </channel>
</rss>

