<?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: compress file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608316#M234036</link>
    <description>It is suggested to do this archive execution @ non-working hours. i.e) /tmp directory access has to idle so that it will be successful else problem will come bcas of opened files.&lt;BR /&gt;&lt;BR /&gt;You can do archive as,&lt;BR /&gt;&lt;BR /&gt;tar -cvf archive_$(date +'%d%b%y-%H:%M%p').tar /tmp/*&lt;BR /&gt;[[ $? -eq 0 ]] &amp;amp;&amp;amp; echo "Tar execution is success @ $(date +'%d%b%y-%H:%M%p')"&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 22 Aug 2005 04:31:02 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-08-22T04:31:02Z</dc:date>
    <item>
      <title>compress file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608313#M234033</link>
      <description>In the directory /tmp , there are some files and new files will be generated into it, I want to regularly archive the files into one by tar , for simple manage the file , I want to add date and time  to the end of file ( eg. if I archive it at 10 Aug 05 , 10:00am , the file name should be file.10Aug05-10:00am , could suggest how to do it ? thx in advance.</description>
      <pubDate>Mon, 22 Aug 2005 01:50:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608313#M234033</guid>
      <dc:creator>peterchu</dc:creator>
      <dc:date>2005-08-22T01:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: compress file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608314#M234034</link>
      <description>Do something like this&lt;BR /&gt;filename=`date '+%d%b%y-%I%p'`&lt;BR /&gt;tar cvf /&lt;SOMEWHERE&gt;$filename.tar /tmp/&lt;YOURFILES to="" archive=""&gt;&lt;BR /&gt;Does it solve what you want&lt;/YOURFILES&gt;&lt;/SOMEWHERE&gt;</description>
      <pubDate>Mon, 22 Aug 2005 01:58:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608314#M234034</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2005-08-22T01:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: compress file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608315#M234035</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;It is allthough not suggested to archive all these files as many of these files will be opened by running processes.&lt;BR /&gt;&lt;BR /&gt;Allthough try this by writing a small script and then calling this script manually or through crontab/at.Define following two line apart from other general ones in your script.&lt;BR /&gt;========================================&lt;BR /&gt;TIMESTAMP=$(date +%m%d.%I%M)&lt;BR /&gt;tar -cvf  /tmp/tararchive.TIMESTAMP /tmp/files&lt;BR /&gt;========================================&lt;BR /&gt;&lt;BR /&gt;This will stamp time in all the files created but your syntax will be slightly different. But this I think is enough for you to start with.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Devender</description>
      <pubDate>Mon, 22 Aug 2005 02:01:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608315#M234035</guid>
      <dc:creator>Devender Khatana</dc:creator>
      <dc:date>2005-08-22T02:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: compress file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608316#M234036</link>
      <description>It is suggested to do this archive execution @ non-working hours. i.e) /tmp directory access has to idle so that it will be successful else problem will come bcas of opened files.&lt;BR /&gt;&lt;BR /&gt;You can do archive as,&lt;BR /&gt;&lt;BR /&gt;tar -cvf archive_$(date +'%d%b%y-%H:%M%p').tar /tmp/*&lt;BR /&gt;[[ $? -eq 0 ]] &amp;amp;&amp;amp; echo "Tar execution is success @ $(date +'%d%b%y-%H:%M%p')"&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Aug 2005 04:31:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608316#M234036</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-22T04:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: compress file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608317#M234037</link>
      <description>Just change as,&lt;BR /&gt;&lt;BR /&gt;tar -cvf /tmp/archive_$(date +'%d%b%y-%H:%M%p').tar /tmp/*&lt;BR /&gt;[[ $? -eq 0 ]] &amp;amp;&amp;amp; echo "Tar execution is success @ $(date +'%d%b%y-%H:%M%p')"&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Mon, 22 Aug 2005 04:32:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-file/m-p/3608317#M234037</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-22T04:32:42Z</dc:date>
    </item>
  </channel>
</rss>

