-
I need to automate the removal of the archieve logs after a cold back-up.
Can someone post that unix script, or a similar script here.
Thank you.
(If someone already has one, that will save me a lot of time; rather that starting one from scratch).
Thanks.
-
heh
hmm ... I just do this manually ...
Maybe I should use a script as well. I normally keep about a 2 weeks worth of Archived Logs ...
-
After a cold backup, you can remove all the archived redo logs (in theory of course). The point of a cold backup is that you get a complete copy of the database. Any changes after that point in time can be recoved via the archived redo-logs.
Otherwise:
find /u22/oraarch/$ORACLE_SID -mtime +5 -exec rm -f {} \;
Jeff Hunter
-
marist89 wrote:
"find /u22/oraarch/$ORACLE_SID -mtime +5 -exec rm -f {} \"
What is -mtime doing ?
Also, all I really need to do is get a list of the files that are older than a certain time in a dir.-how do I do that?
Anyone?
-
man find
-mtime detects files that have a modified time of x. If you specify +x, it finds files older than x days. If you specify -x, it finds files newer than x days old.
To find files older than 15 days:
find . -mtime +15 -print
Jeff Hunter
-
OK, I have a related question:
How to compare dates in UNIX. Can I day "if $x < $y", if x and y are variables ? If so, how ?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|