RE: files older than 12 hours

RE: files older than 12 hours

 

  

I have struggled with this ... so have our Unix Admins.

Apparently, looking for files that are 1 day old will keep 2 days worth
of files ... don't know why ... something about today being "0-.99",
yesterday being "1-1.99". Since you are asking to delete files older
than 1 day, files will not be deleted until they reach "2" It's strange
to me!

So try looking for files a that are +.5 days old. You might also try
+.45 to make sure you capture the 12 hours-old files as well. I suggest
you copy today's files to another location and practice the percentages
on them until you get the correct percentage.

I hope this is right ... it is very confusing to me.



Randy Netz
Oracle DBA
816-860-3921 (work)
816-686-1639 (cell)

-----Original Message-----
From: Abeam Consultants
[mailto:oracledba-ezmlmshield-x52369533.[Email address protected]
Sent: Thursday, December 30, 2004 10:16 AM
To: LazyDBA Discussion
Subject: files older than 12 hours


All,

Is there any way I can find out the files older than 12 hours and delete
them. I tried mtime and atime But it is showing today's file also and I
want to delet all the files which are 12 hours old.

find . -name '*.req' -mtime +1 -exec ls -l {} * \;

find . -name '*.req' -mtime +1 -exec rm {} * \;

Regards,
Inder


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


Oracle LazyDBA home page