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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: UNIX question

Re: UNIX question

From: Carel-Jan Engel <cjpengel.dbalert_at_xs4all.nl>
Date: Wed, 6 Apr 2005 16:18:47 +0200 (CEST)
Message-ID: <16173.145.61.28.21.1112797127.squirrel@145.61.28.21>


Jaffar,

No ready to use example, just some hints.

  1. use touch to create a file with a timestamp of 2 hours ago (see manpage of touch)
  2. create a list of all logfiles (list1)
  3. create a list (list2) of files newer than this file using find with the -newer option (see manpage)
  4. remove elements of list2 from list1
  5. rm file listed in list1

alas find has no -older function, and the -atime option works with a 'day'-unit.

Regards, Carel-Jan

===
If you think education is expensive, try ignorance. (Derek Bok) ===

> Hello list,
>
> Can any one give me an example, how can I delete log files <2hrs to my
> system time.
>
>
> --
> Best Regards,
> Jaffar, OCP DBA
> Banque Saudi Fransi
> Saudi Arabia
> ----------------------------------------------------------------------------------------
> "It is your atittude, not your aptitude that determins your altitude."
> --
> http://www.freelists.org/webpage/oracle-l
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Apr 06 2005 - 10:23:53 CDT

Original text of this message

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