scripts to move trace file
I wrote a korn shell script that will run on the first of each month and put the trace file from previous month to another folder.
cd /apps/oracle/diag/rdbms/test/test/trace
curmth=`date +%m`
set -A mth Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
prevmth=${mth[$((curmth - 1))]}
curyr=`date '+%Y'`
mkdir trace_$prevmth$curyr
find /apps/oracle/diag/rdbms/test/test/trace -mtime +1 -name "*.[tt][rr][cm]" -exec mv {} /apps/oracle/diag/rdbms/test/test/trace/trace_$prevmth$curyr