HOSTNAME=`/bin/uname -n`; export HOSTNAME
WHO_AM_I=`who am i | awk '{print $1}'`; export WHO_AM_I
TODAY=`date '+%d-%b-%Y:%H:%M'`; export TODAY
cd /u01/oracle/diag/rdbms/dgtest_p/DGTEST/trace
cp ./alert_$ORACLE_SID.log ./alert_$ORACLE_SID.log.$TODAY
cat /dev/null > ./alert_$ORACLE_SID.log
or just
mv ./alert_$ORACLE_SID.log ./alert_$ORACLE_SID.log.$TODAY
沒有留言:
張貼留言