Re: Purging Oracle log files on Windows

  • From: Andrew Kerber <andrew.kerber@xxxxxxxxx>
  • To: dghickson@xxxxxxxxx
  • Date: Fri, 6 Aug 2010 13:44:03 -0500

The file has just this one line.  Both / and - can be used in forfiles, the
command below deletes all files in c:\app\oracle\product\10.2.0\db_1\admin
and below that named *.trc that are older than 14 days.  Note the delete
section is in caps, at least some windows versions require that.:

forfiles -p C:\app\oracle\product\10.2.0\db_1\admin -s -m*.trc -d -14 -c
"CMD /C del @FILE"

On Fri, Aug 6, 2010 at 1:37 PM, Darryl Hickson <dghickson@xxxxxxxxx> wrote:

>  Andrew,
>
> If you can’t find yours let me know. I can put my hands on my script right
> away.
>
>
>
> Thanks,
> Darryl
>
>
>
> *From:* oracle-l-bounce@xxxxxxxxxxxxx [mailto:
> oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Andrew Kerber
> *Sent:* Friday, August 06, 2010 2:21 PM
> *To:* peter.schauss@xxxxxxx
> *Cc:* oracle-l@xxxxxxxxxxxxx
> *Subject:* Re: Purging Oracle log files on Windows
>
>
>
> I have a script using forfiles that does it, I will track it down.
>
> On Fri, Aug 6, 2010 at 1:15 PM, Schauss, Peter (IT Solutions) <
> peter.schauss@xxxxxxx> wrote:
>
> In the years since I started working as a DBA I have accumulated a
> collection of UNIX shell scripts which run as cron jobs to delete old
> log files.  Most of these scripts use find to retrieve files older than
> a specified number of days.  Is there anything equivalent in DOS?
>
> I know that there are some utilities available that emulate a UNIX
> shell, but our security people have rather strict rules about what we
> are allowed to install on our servers.
>
> Thanks,
> Peter Schauss
> --
> //www.freelists.org/webpage/oracle-l
>
>
>
>
> --
> Andrew W. Kerber
>
> 'If at first you dont succeed, dont take up skydiving.'
>



-- 
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'

Other related posts: