<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882274#M101191</link>
    <description>Hi,&lt;BR /&gt;The /tmp/tar.txt must exist, it is this file you try to backup.&lt;BR /&gt;&lt;BR /&gt;try&lt;BR /&gt;&lt;BR /&gt;tar cvf &lt;TAPE_DEVICE_FILE&gt; &lt;DIRECTORY_TO_BACKUP&gt;&lt;/DIRECTORY_TO_BACKUP&gt;&lt;/TAPE_DEVICE_FILE&gt;</description>
    <pubDate>Wed, 15 Jan 2003 09:03:32 GMT</pubDate>
    <dc:creator>Leif Halvarsson_2</dc:creator>
    <dc:date>2003-01-15T09:03:32Z</dc:date>
    <item>
      <title>Tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882273#M101190</link>
      <description>I want the tar function to backup, I try to tar a non-existing file , but the system output is still "0" , can suggest what is wrong ? thx.&lt;BR /&gt;&lt;BR /&gt;my tar script is:&lt;BR /&gt;tar -cvf /dev/tape /tmp/tar.txt &lt;BR /&gt;if [ $? -eq 0 ] &lt;BR /&gt;then echo "successful"&lt;BR /&gt;else &lt;BR /&gt;echo "fail"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;but the result is "0" even the file "/tmp/tar.txt" is not existing.</description>
      <pubDate>Wed, 15 Jan 2003 08:21:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882273#M101190</guid>
      <dc:creator>Juno</dc:creator>
      <dc:date>2003-01-15T08:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882274#M101191</link>
      <description>Hi,&lt;BR /&gt;The /tmp/tar.txt must exist, it is this file you try to backup.&lt;BR /&gt;&lt;BR /&gt;try&lt;BR /&gt;&lt;BR /&gt;tar cvf &lt;TAPE_DEVICE_FILE&gt; &lt;DIRECTORY_TO_BACKUP&gt;&lt;/DIRECTORY_TO_BACKUP&gt;&lt;/TAPE_DEVICE_FILE&gt;</description>
      <pubDate>Wed, 15 Jan 2003 09:03:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882274#M101191</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-01-15T09:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882275#M101192</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I had the same problem with the return code of tar.&lt;BR /&gt;A solution is to control the backup using tar -tvf /dev/tape an comparing the output with the list of the expected files.&lt;BR /&gt;&lt;BR /&gt;# find &lt;DIR&gt; -type f &amp;gt; list.txt&lt;BR /&gt;# cat list.txt | sort -u &amp;gt; list.expected&lt;BR /&gt;# tar -cvf /dev/tape &lt;DIR&gt;&lt;BR /&gt;# tar -tvf /dev/tape &amp;gt; list.txt&lt;BR /&gt;# cat list.txt | sort -u &amp;gt; list.tar&lt;BR /&gt;# diff list.expected list.tar&lt;BR /&gt;&lt;BR /&gt;Fr??d??ric&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIR&gt;&lt;/DIR&gt;</description>
      <pubDate>Wed, 15 Jan 2003 09:13:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882275#M101192</guid>
      <dc:creator>Frederic Sevestre</dc:creator>
      <dc:date>2003-01-15T09:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882276#M101193</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This problem is present in my instalation just in 10.20 however in 11.0 works fine, but this is not a tar error because if you put an "echo $?" after tar command you must see return code 5. So the problem is the if value validation, may be needs a cumulative command patch. However I recomend you this routine:&lt;BR /&gt;&lt;BR /&gt;tar -cvf /dev/tape /tmp/tar.txt&lt;BR /&gt;STATUS=$?&lt;BR /&gt;case $STATUS in&lt;BR /&gt; 0) echo "Successful"&lt;BR /&gt; ;;&lt;BR /&gt; *) echo "Fail with status: $STATUS"&lt;BR /&gt; ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Wed, 15 Jan 2003 09:59:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2882276#M101193</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2003-01-15T09:59:09Z</dc:date>
    </item>
  </channel>
</rss>

