<?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: redirect tar? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526554#M220720</link>
    <description>Ian,&lt;BR /&gt;&lt;BR /&gt;tar cvf /tmp/mytar.tar /tmp/error &amp;gt; /tmp/mytar.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;will do it for you.&lt;BR /&gt;&lt;BR /&gt;bueno bye</description>
    <pubDate>Tue, 19 Apr 2005 12:45:09 GMT</pubDate>
    <dc:creator>Robert Salter</dc:creator>
    <dc:date>2005-04-19T12:45:09Z</dc:date>
    <item>
      <title>redirect tar?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526549#M220715</link>
      <description>What am I doing wrong?&lt;BR /&gt;When I try something like &lt;BR /&gt;tar cvf /tmp/mytar.tar /tmp/error &amp;gt;/tmp/mytar.log &lt;BR /&gt;I do not get the expected .log file. While /tmp/mytar.log is created it is empty and tar -v still writes to the screen?&lt;BR /&gt;&lt;BR /&gt;There is a tar command running from cron that backs up files. All I want to do is redirect the output of this command so that I can check the log file in the morning.&lt;BR /&gt;&lt;BR /&gt;Ian</description>
      <pubDate>Sun, 17 Apr 2005 21:36:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526549#M220715</guid>
      <dc:creator>Ian_79</dc:creator>
      <dc:date>2005-04-17T21:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: redirect tar?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526550#M220716</link>
      <description>Hi Ian,&lt;BR /&gt;&lt;BR /&gt;You have a script to backup the files. And this script is scheduled using cron. If you want the output of the scheduled job, then you can specify the log in the cron schedule itself.&lt;BR /&gt;&lt;BR /&gt;For example you have scheduled the script called "backup_tar.sh" which has the commands to backup the files using tar, and you schedule this script to run every day at 16:00 hours then do this.&lt;BR /&gt;&lt;BR /&gt;00 16 * * * /path/backup_tar.sh &amp;gt; /path/logs/backup_tar_output.log&lt;BR /&gt;&lt;BR /&gt;This backup_tar_output.log will have the output of the backup script execution.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Indira A&lt;BR /&gt;</description>
      <pubDate>Sun, 17 Apr 2005 22:10:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526550#M220716</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2005-04-17T22:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: redirect tar?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526551#M220717</link>
      <description>Try as,&lt;BR /&gt;&lt;BR /&gt;nohup tar cvf /tmp/mytar.tar /tmp/error so that it will log all details into nohup.log file.&lt;BR /&gt;&lt;BR /&gt;If you get messages on screen then it may be ERROR messages. Try as,&lt;BR /&gt;&lt;BR /&gt;tar cvf /tmp/mytar.tar /tmp/error 1&amp;gt;/tmp/mytar.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;HTH.</description>
      <pubDate>Mon, 18 Apr 2005 01:18:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526551#M220717</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-04-18T01:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: redirect tar?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526552#M220718</link>
      <description>Thank-you both for your responses.&lt;BR /&gt;&lt;BR /&gt;I have tried using nohup as suggested &lt;BR /&gt;nohup tar cvf /tmp/mytar.tar /tmp/error.&lt;BR /&gt;I still got the tar listing on the screen and couldn't find the nohup log in either the current directory or the $HOME directory?&lt;BR /&gt;&lt;BR /&gt;When I try &lt;BR /&gt;tar cvf /tmp/mytar.tar /tmp/error 1&amp;gt;/tmp/mytar.log&lt;BR /&gt;&lt;BR /&gt;I get an error message saying&lt;BR /&gt;tar : cannot stat 1. not dumped&lt;BR /&gt;Can I tell tar that 1 is not a file to be added to the archive?&lt;BR /&gt;&lt;BR /&gt;This is not a major problem for me as I can write a script for the cron job as suggested by Indira.&lt;BR /&gt;I am still curious and frustrated as to why I can't achieve this seemly simple redirection. I have no problems achieving this in Linux but fails with HPUX.&lt;BR /&gt;&lt;BR /&gt;Ian.</description>
      <pubDate>Mon, 18 Apr 2005 18:27:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526552#M220718</guid>
      <dc:creator>Ian_79</dc:creator>
      <dc:date>2005-04-18T18:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: redirect tar?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526553#M220719</link>
      <description>tar is sending verbose messasages to standard error, so you'll need to redirect both standard output and standard error to your file.&lt;BR /&gt;&lt;BR /&gt;It looks like you are using csh, therefore use&lt;BR /&gt;&lt;BR /&gt;$ tar cvf test.tar &lt;FILES&gt; &amp;gt;&amp;amp; tar.log&lt;/FILES&gt;</description>
      <pubDate>Mon, 18 Apr 2005 22:32:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526553#M220719</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-04-18T22:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: redirect tar?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526554#M220720</link>
      <description>Ian,&lt;BR /&gt;&lt;BR /&gt;tar cvf /tmp/mytar.tar /tmp/error &amp;gt; /tmp/mytar.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;will do it for you.&lt;BR /&gt;&lt;BR /&gt;bueno bye</description>
      <pubDate>Tue, 19 Apr 2005 12:45:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526554#M220720</guid>
      <dc:creator>Robert Salter</dc:creator>
      <dc:date>2005-04-19T12:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: redirect tar?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526555#M220721</link>
      <description>Have you tried the "tee -a" option?&lt;BR /&gt;&lt;BR /&gt;LOGFILE=/tmp/mytar.log&lt;BR /&gt;tar cvf /tmp/mytar.tar /tmp/error | tee -a $LOGFILE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2005 12:53:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526555#M220721</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-04-19T12:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: redirect tar?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526556#M220722</link>
      <description>Thanks to all of you who took the time to answer my problem. Ermin is exactly right I didn't realise that verbose was using stderr. I also didn't pick up that the account I was using was using the c shell and not posix - ooops.</description>
      <pubDate>Wed, 20 Apr 2005 22:29:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirect-tar/m-p/3526556#M220722</guid>
      <dc:creator>Ian_79</dc:creator>
      <dc:date>2005-04-20T22:29:35Z</dc:date>
    </item>
  </channel>
</rss>

