DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: unix sheel: how do I remove trace files older than x date ?

  1. #1
    Join Date
    Sep 2000
    Location
    Chicago, IL
    Posts
    316

    unix sheel: how do I remove trace files older than x date ?

    Does anyone have the code to remove trace files that are older than a certain date ?

  2. #2
    Join Date
    Apr 2001
    Location
    Louisville KY
    Posts
    295
    without knowing some particulars, a variation on

    find . -new 'keeper file name' -print | rm

    would work. (Substitute a real file name where obvious).

    other variations would use -mtime, -ctime or -atime parameters of find.
    Joseph R.P. Maloney, CSP,CDP,CCP
    'The answer is 42'

  3. #3
    Join Date
    Nov 2002
    Posts
    1

    Try this on UNIX

    find . -name *trc -atime +7 -exec rm {} \;

    if on NT get there are some nt ports available of the common unix commands

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    There are lots of variations on find. man find will give you the details...
    Jeff Hunter

  5. #5
    Join Date
    Jul 2002
    Location
    California
    Posts
    128
    If your installation follows OFA, the following command will trim logs that have not been accessed withing the past 7 days...

    *** replace ? with your database name (i.e ORCL) ***


    find $ORACLE_HOME/admin/?/bdump -name "*.trc" -atime +7 -exec rm {} \;
    alapps

    Fast, Cheap, Reliable... Pick Two(2)

  6. #6
    Join Date
    Sep 2000
    Location
    Chicago, IL
    Posts
    316

    Talking

    Thankyou rfmm1 amd alapps,
    that was exactly what I was looking for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width