<?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: Script for recycle. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535808#M368799</link>
    <description>crudely, it can be done with something along the lines of :&lt;BR /&gt;&lt;BR /&gt;if [ -e debug_log.old ]&lt;BR /&gt;then&lt;BR /&gt; cp debug_log.old debug_log.older&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;cp debug.log debug_log.old&lt;BR /&gt;&lt;BR /&gt;&amp;gt; debug.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;note:&lt;BR /&gt;&lt;BR /&gt;the reason *not* to use move in this case is that if something has file open, it will continue writing to the .old file.  &lt;BR /&gt;&lt;BR /&gt;depending on how often entries are written to the log, you might loose a few when the existing file is cleared with the "&amp;gt;".&lt;BR /&gt;&lt;BR /&gt;once the script works as desired, you can stick it in cron to run at whatever times / intervals desired.</description>
    <pubDate>Wed, 18 Nov 2009 14:22:03 GMT</pubDate>
    <dc:creator>OldSchool</dc:creator>
    <dc:date>2009-11-18T14:22:03Z</dc:date>
    <item>
      <title>Script for recycle.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535807#M368798</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I need script to recycle the debug logs after every 30 or 60 minutes. Just rename existing file and keep at least two copies.please proivde me an example of it.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 18 Nov 2009 07:16:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535807#M368798</guid>
      <dc:creator>syedar</dc:creator>
      <dc:date>2009-11-18T07:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script for recycle.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535808#M368799</link>
      <description>crudely, it can be done with something along the lines of :&lt;BR /&gt;&lt;BR /&gt;if [ -e debug_log.old ]&lt;BR /&gt;then&lt;BR /&gt; cp debug_log.old debug_log.older&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;cp debug.log debug_log.old&lt;BR /&gt;&lt;BR /&gt;&amp;gt; debug.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;note:&lt;BR /&gt;&lt;BR /&gt;the reason *not* to use move in this case is that if something has file open, it will continue writing to the .old file.  &lt;BR /&gt;&lt;BR /&gt;depending on how often entries are written to the log, you might loose a few when the existing file is cleared with the "&amp;gt;".&lt;BR /&gt;&lt;BR /&gt;once the script works as desired, you can stick it in cron to run at whatever times / intervals desired.</description>
      <pubDate>Wed, 18 Nov 2009 14:22:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535808#M368799</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-18T14:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Script for recycle.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535809#M368800</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Using cron execute the below script according to your timing.&lt;BR /&gt;&lt;BR /&gt;sample script&lt;BR /&gt;---------------&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;for i in 1&lt;BR /&gt;do&lt;BR /&gt;cp log copy_1_`date +%Y%m%d%H%M%S`&lt;BR /&gt;cp log copy_2_`date +%Y%m%d%H%M%S`&lt;BR /&gt;&amp;gt;log&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Please change the log destinations.&lt;BR /&gt;&lt;BR /&gt;Aneesh</description>
      <pubDate>Wed, 18 Nov 2009 15:08:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535809#M368800</guid>
      <dc:creator>Aneesh Mohan</dc:creator>
      <dc:date>2009-11-18T15:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Script for recycle.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535810#M368801</link>
      <description>"#!/usr/bin/ksh&lt;BR /&gt;for i in 1&lt;BR /&gt;do&lt;BR /&gt;cp log copy_1_`date +%Y%m%d%H%M%S`&lt;BR /&gt;cp log copy_2_`date +%Y%m%d%H%M%S`&lt;BR /&gt;&amp;gt;log&lt;BR /&gt;done&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;uh...doesn't that give you two copies of the same log????</description>
      <pubDate>Wed, 18 Nov 2009 21:33:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535810#M368801</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-11-18T21:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Script for recycle.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535811#M368802</link>
      <description>Hi,&lt;BR /&gt;use logrotate tool for this purpose. You can download the depot @ &lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This is very simple, u can play with it easily (and without writing lines of code).&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Thu, 19 Nov 2009 08:30:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535811#M368802</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2009-11-19T08:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script for recycle.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535812#M368803</link>
      <description>Hello,&lt;BR /&gt;please, since people spent time to provide you help, please, spent your time to assign points:&lt;BR /&gt;&lt;A href="http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1387538" target="_blank"&gt;http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1387538&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Art</description>
      <pubDate>Wed, 25 Nov 2009 09:22:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-recycle/m-p/4535812#M368803</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2009-11-25T09:22:42Z</dc:date>
    </item>
  </channel>
</rss>

