Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to purge the files that are older than 90 days

Re: how to purge the files that are older than 90 days

From: Richard Piasecki <usenet2_at_ogoent.com>
Date: 7 Sep 2006 12:11:03 -0500
Message-ID: <1vj0g2tqatvdtivc62un4jg0j1aj38mbeu@4ax.com>


On 7 Sep 2006 09:18:05 -0700, "muddu" <mudassar.dba_at_gmail.com> wrote:

>Hi All ORA DBA's,
>
>I am in need of a unix shell script that will purge(clean up) all the
>files from history that are older than 90 days.
>
>Thanks
>Muddu.

This is standard Unix stuff, not DBA specific. Be very, very careful with this command.

find ./ -mtime +90 -exec rm {} \; -print

The above command deletes anything that hasn't been modified in the past 90 days in the current directory hierarchy. If you want a specific directory hierarchy, substitute that for the "./". For example...

find /home/oracle/personal -mtime +90 -exec rm {} \; -print

That command will delete everything under /home/oracle/personal that hasn't been modified in 90 days. Again, be very careful about where you run this command.

Received on Thu Sep 07 2006 - 12:11:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US