<?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 create a script to delete old Oracle archive log files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422976#M859019</link>
    <description>Howdy!  I need assistance with creating a script to delete old log files. Oracle creates archive log files. I want to keep files for at least 14 days and delete older files.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help!!</description>
    <pubDate>Tue, 16 Nov 2004 09:04:13 GMT</pubDate>
    <dc:creator>Yvette Johnson</dc:creator>
    <dc:date>2004-11-16T09:04:13Z</dc:date>
    <item>
      <title>create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422976#M859019</link>
      <description>Howdy!  I need assistance with creating a script to delete old log files. Oracle creates archive log files. I want to keep files for at least 14 days and delete older files.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help!!</description>
      <pubDate>Tue, 16 Nov 2004 09:04:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422976#M859019</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-16T09:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422977#M859020</link>
      <description>You can run this one liner as a cronjob every day..&lt;BR /&gt;&lt;BR /&gt;find dirname -type f -mtime +14 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;-USA..</description>
      <pubDate>Tue, 16 Nov 2004 09:08:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422977#M859020</guid>
      <dc:creator>Uday_S_Ankolekar</dc:creator>
      <dc:date>2004-11-16T09:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422978#M859021</link>
      <description>Thanks for you help!</description>
      <pubDate>Tue, 16 Nov 2004 09:12:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422978#M859021</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-16T09:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422979#M859022</link>
      <description>I typed &lt;BR /&gt;find prod*.arc -type f -mtime +14 -exec rm{}\;&lt;BR /&gt;&lt;BR /&gt;Results:  find: -exec not terminated with ';'&lt;BR /&gt;&lt;BR /&gt;What did I do wrong?</description>
      <pubDate>Tue, 16 Nov 2004 14:08:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422979#M859022</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-16T14:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422980#M859023</link>
      <description>You need a space between the } and the \.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 16 Nov 2004 14:10:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422980#M859023</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-11-16T14:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422981#M859024</link>
      <description>I typed: &lt;BR /&gt;find prod*.arc -type f -mtime +14 -exec rm{ } \;&lt;BR /&gt;&lt;BR /&gt;Results: Missing }.</description>
      <pubDate>Tue, 16 Nov 2004 14:17:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422981#M859024</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-16T14:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422982#M859025</link>
      <description>I would also suggest that you use a full path name for the directory.  You will probably want to run this from cron and cron has a pretty minimal environment so full path names are a necessity, even to the point of specifying /usr/bin/find rather than just find.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 16 Nov 2004 14:19:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422982#M859025</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-11-16T14:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422983#M859026</link>
      <description>I received this message from crontab when saving the file:&lt;BR /&gt;&lt;BR /&gt;31 14 find /testing1/arch-prod/prod*.arc -type f -mtime +14 -exec rm{ } \;&lt;BR /&gt;crontab: error on previous line; unexpected character found in line.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Nov 2004 14:31:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422983#M859026</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-16T14:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422984#M859027</link>
      <description>Try &lt;BR /&gt;find /testing1/arch-prod -name 'prod*.arc' -type f -mtime +14 -exec rm{ } \;&lt;BR /&gt;&lt;BR /&gt;instead.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Nov 2004 14:35:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422984#M859027</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-11-16T14:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422985#M859028</link>
      <description>Oh, and you've also got an extra space between your curly braces - it should be {} \; - that's curlybrace curleybrace space backslash semicolon.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 16 Nov 2004 14:37:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422985#M859028</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-11-16T14:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422986#M859029</link>
      <description>I removed the space but I'm still getting the error message when saving cron.&lt;BR /&gt;&lt;BR /&gt;I ran this command manually, my results were "Usage: rm [-Rfir] file ..."</description>
      <pubDate>Tue, 16 Nov 2004 14:44:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422986#M859029</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-16T14:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422987#M859030</link>
      <description>find /testing1/arch-prod -name 'prod*.arc' -type f -mtime +14 -exec rm{} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 16 Nov 2004 14:50:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422987#M859030</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-11-16T14:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422988#M859031</link>
      <description>Oops - now we're missing a space before the first curly brace - it should be:&lt;BR /&gt;&lt;BR /&gt;find /testing1/arch-prod -name 'prod*.arc' -type f -mtime +14 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 16 Nov 2004 14:57:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422988#M859031</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-11-16T14:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422989#M859032</link>
      <description>find /testing1/arch-prod/ -type f -mtime +14 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I used this command and it works.  Thanks for your help!</description>
      <pubDate>Tue, 16 Nov 2004 15:04:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422989#M859032</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-16T15:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422990#M859033</link>
      <description>Yvette,&lt;BR /&gt;&lt;BR /&gt;Just so you know, the way you have the command, it's going to delete every file in /testing1/arch-prod/ that's older than 14 days.  If the only thing in that directory is archive log files then that's fine.  If there are other files located there, you're going to want to specify exactly what you want to delete with the -name syntax that I've been showing you.&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 16 Nov 2004 15:18:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422990#M859033</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-11-16T15:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422991#M859034</link>
      <description>The only thing in this directory is archive log files.&lt;BR /&gt;&lt;BR /&gt;Again, thanks for your help!&lt;BR /&gt;&lt;BR /&gt;Yvette</description>
      <pubDate>Tue, 16 Nov 2004 15:24:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422991#M859034</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-16T15:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422992#M859035</link>
      <description>Yvette,&lt;BR /&gt;&lt;BR /&gt;It is great to hear/see that the question you asked is answerred. But I can not help but wonder whether you asked the right question.&lt;BR /&gt;&lt;BR /&gt;The validity / usefulness of Oracle archive logs is only indirectly a function of their age. The real decision whether you can delete an archive log is &lt;BR /&gt;1- whether it is moved to more permanent storage&lt;BR /&gt;2- whether a fresh full backup was made in teh mean time.&lt;BR /&gt;&lt;BR /&gt;If your main backup is 16 days old, then you will need those archive logs from day 14 and 15 in order to be able to recover.&lt;BR /&gt;&lt;BR /&gt;Conversely, if your main backup is 7 days old, then all archives older than 8 days are useless.&lt;BR /&gt;&lt;BR /&gt;I hope that your archive cleaning is carefully integrated with your backup procedures!&lt;BR /&gt;&lt;BR /&gt;Mind you I have never ever actually had to set this up, but if I had to, then I would probably rename my archive log directory to a date-stamped one whenever i made a new full backup, and create a fresh empty directory. And when/if I roll them out to tape/optical storage then I'd rename them into yet another 'archived' directory. In doing so the directories would tell me what can safely be deleted, not the ages of the file.&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Nov 2004 23:39:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422992#M859035</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-11-16T23:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: create a script to delete old Oracle archive log files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422993#M859036</link>
      <description>Thanks for your reply.  We perform a tape back up of the archive logs. We try to keep at least 14 days on the server.</description>
      <pubDate>Wed, 17 Nov 2004 15:03:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-a-script-to-delete-old-oracle-archive-log-files/m-p/3422993#M859036</guid>
      <dc:creator>Yvette Johnson</dc:creator>
      <dc:date>2004-11-17T15:03:54Z</dc:date>
    </item>
  </channel>
</rss>

