<?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 command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858385#M95494</link>
    <description>Tar isn't very sophisticated in this respect&lt;BR /&gt;&lt;BR /&gt;The best you can hope for is to create the archive using&lt;BR /&gt;&lt;BR /&gt;cd /etc&lt;BR /&gt;tar cvf /dev/rmt/0m hosts&lt;BR /&gt;&lt;BR /&gt;This will then create the archive with no leading directories, so that you can then use&lt;BR /&gt;&lt;BR /&gt;cd /your_new_dir&lt;BR /&gt;tar xvf /dev/rmt/0m hosts</description>
    <pubDate>Thu, 05 Dec 2002 11:54:24 GMT</pubDate>
    <dc:creator>Chris Wilshaw</dc:creator>
    <dc:date>2002-12-05T11:54:24Z</dc:date>
    <item>
      <title>Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858383#M95492</link>
      <description>Anybady know the tar option to ignore the file origin directory in tape, use "tar option" to restore the any  current directory.&lt;BR /&gt;For example, tar cvf /dev/rmt/0m /etc/hosts. Want use "tar 'option' /dev/rmt/0m 'current directory'"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ken</description>
      <pubDate>Thu, 05 Dec 2002 11:45:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858383#M95492</guid>
      <dc:creator>kenlo</dc:creator>
      <dc:date>2002-12-05T11:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858384#M95493</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;see 2.3 if your restore whole archive&lt;BR /&gt;&lt;BR /&gt;2.0  tar&lt;BR /&gt;&lt;BR /&gt;2.1  Save a Directory Path With `tar'&lt;BR /&gt;&lt;BR /&gt;If the f option with `tar' is omitted it will take /dev/rmt/0m as the&lt;BR /&gt;default tape device file. If your tape drive device file differs, add the&lt;BR /&gt;`f' option.&lt;BR /&gt;&lt;BR /&gt;tar cv /directory       (absolute path not recommended)&lt;BR /&gt;&lt;BR /&gt;cd /directory; tar cv .         (relative path recommended)&lt;BR /&gt;or&lt;BR /&gt;tar cv ./dir1 ./dir2 ./dir3 .....               (for multiple directories)&lt;BR /&gt;&lt;BR /&gt;2.2  What is written on the `tar' tape?&lt;BR /&gt;&lt;BR /&gt;tar tv&lt;BR /&gt;tar tv &amp;gt;/tmp/index&lt;BR /&gt;&lt;BR /&gt;2.3  Restore with `tar'.&lt;BR /&gt;&lt;BR /&gt;cd /directory ; tar xv    (relative tar restore)&lt;BR /&gt;&lt;BR /&gt;2.4  `tar' via network.&lt;BR /&gt;&lt;BR /&gt;Write a `tar' tape on a remote computer that owns a DAT/DDS drive.&lt;BR /&gt;&lt;BR /&gt;cd /relative_path&lt;BR /&gt;tar cvf - . | remsh name -l user "cat - | dd of=/dev/rmt/0m bs=10k"&lt;BR /&gt;&lt;BR /&gt;Restore a `tar' tape from a remote computer that owns a DAT/DDS drive.&lt;BR /&gt;cd /relative_path&lt;BR /&gt;remsh name -l user dd if=/dev/rmt/0m bs=10k | tar xvf -&lt;BR /&gt;&lt;BR /&gt;2.5  Good to know about tar!&lt;BR /&gt;&lt;BR /&gt;`tar' is an easy command and can be used as interchange format. These are&lt;BR /&gt;the only advantages.&lt;BR /&gt;&lt;BR /&gt;I would like to advise you not to use `tar' to back-up a couple of gigabytes,&lt;BR /&gt;because `tar' does not support `regular expressions'.  Selected file&lt;BR /&gt;retrieval is only possible by this command:&lt;BR /&gt;&lt;BR /&gt;tar xv `tar t | grep "^user/drawings*"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To backup and recover to another directory with great options you need fbackup/frecover.&lt;BR /&gt;&lt;BR /&gt;                       Regards&lt;BR /&gt;&lt;BR /&gt;                       Steve Steel&lt;BR /&gt;&lt;BR /&gt;Quote of the moment&lt;BR /&gt;-------------------&lt;BR /&gt;"We are drowning in information but starved for knowledge."&lt;BR /&gt;-- John Naisbitt</description>
      <pubDate>Thu, 05 Dec 2002 11:53:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858384#M95493</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-12-05T11:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858385#M95494</link>
      <description>Tar isn't very sophisticated in this respect&lt;BR /&gt;&lt;BR /&gt;The best you can hope for is to create the archive using&lt;BR /&gt;&lt;BR /&gt;cd /etc&lt;BR /&gt;tar cvf /dev/rmt/0m hosts&lt;BR /&gt;&lt;BR /&gt;This will then create the archive with no leading directories, so that you can then use&lt;BR /&gt;&lt;BR /&gt;cd /your_new_dir&lt;BR /&gt;tar xvf /dev/rmt/0m hosts</description>
      <pubDate>Thu, 05 Dec 2002 11:54:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858385#M95494</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2002-12-05T11:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858386#M95495</link>
      <description>HP's tar cant do it, but the gun version can. You can download the gnu version of tar from;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/" target="_blank"&gt;http://hpux.cs.utah.edu/&lt;/A&gt;</description>
      <pubDate>Thu, 05 Dec 2002 12:06:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858386#M95495</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-12-05T12:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858387#M95496</link>
      <description>In order to avoid tar backups with absolute path names I always use&lt;BR /&gt;tar -cvf /dev/rmt/rmt/0m ./etc/*&lt;BR /&gt;&lt;BR /&gt;But in case you do take it absolute path names you can restore wiht pax.&lt;BR /&gt;&lt;BR /&gt;cd /your_dir&lt;BR /&gt;pax -rv -s '/^\///' &amp;lt; /dev/rmt/0m&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Dec 2002 12:09:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858387#M95496</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2002-12-05T12:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858388#M95497</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Worst case scenario is a chroot&lt;BR /&gt;&lt;BR /&gt;In the future use fbackup since tar is a simple soul.&lt;BR /&gt;&lt;BR /&gt;Restore a complete directory&lt;BR /&gt;&lt;BR /&gt;/etc/frecover -xi/directory&lt;BR /&gt;/etc/frecover -x -i/directory1 -i/directory2&lt;BR /&gt;&lt;BR /&gt;When restoring a directory, `frecover' will not overwrite an existing&lt;BR /&gt;file, except if the -o option is used.&lt;BR /&gt;&lt;BR /&gt;It may be nice to recover relative somewhere in a directory like /tmp/local.&lt;BR /&gt;To restore relative, you must go first to the directory with cd, and then&lt;BR /&gt;use the X or F option.&lt;BR /&gt;&lt;BR /&gt;cd /tmp/local; /etc/frecover -xvXi /directory&lt;BR /&gt;        (with directory tree path )&lt;BR /&gt;cd /tmp/local; /etc/frecover -xvFi /directory&lt;BR /&gt;        (without path, only files names)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;                       Regards&lt;BR /&gt;&lt;BR /&gt;                       Steve Steel&lt;BR /&gt;&lt;BR /&gt;Quote of the moment&lt;BR /&gt;-------------------&lt;BR /&gt;"We are drowning in information but starved for knowledge."&lt;BR /&gt;-- John Naisbitt</description>
      <pubDate>Thu, 05 Dec 2002 12:44:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858388#M95497</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-12-05T12:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858389#M95498</link>
      <description>As of this moment, Anil is the only one that has it right. You MUST use pax to restore a ABSOLUTE PATH backup to a ALTERNATE (RELATIVE) directory, though I find this syntax a little easier:&lt;BR /&gt;&lt;BR /&gt;cd to desired directory&lt;BR /&gt;pax -r -s ',^/,,' -f file.tar&lt;BR /&gt;&lt;BR /&gt;(no need for back slashes)&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Thu, 05 Dec 2002 12:56:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858389#M95498</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-12-05T12:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858390#M95499</link>
      <description>Harry I was going to put that syntax. I read man page for pax many times but did not understand anything, particularly -s options syntax&lt;BR /&gt;&lt;BR /&gt;It is easy to remember &lt;BR /&gt;/^\///&lt;BR /&gt;&lt;BR /&gt;four forward slashes and one backward slash&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Dec 2002 13:17:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858390#M95499</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2002-12-05T13:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Tar command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858391#M95500</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Harry's use of the comma (",") as a delimiter makes the *substitution* ('-s') 'pax' syntax easier to read than using a "/" delimiter and having to escape its dual meaning as part of a filename or directory and as a delimiter.  *Any* character can be used as a delimiter.  Note that the syntax mirrors that of 'sed'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 05 Dec 2002 13:25:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-command/m-p/2858391#M95500</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-12-05T13:25:00Z</dc:date>
    </item>
  </channel>
</rss>

