echo 'delete archived logs begin'
date
export ORACLE_SID=wisgrpt
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11g/db1
export PATH=/usr/bin:$ORACLE_HOME/bin:/bin
export HOME=/opt/oracle
find /opt/oracle/oradata ! -mtime -2 -exec rm -f '{}' ';'
echo 'delete archived logs end'
crontab -e
20 3 * * * /opt/oracle/del_archivedlog>>/opt/oracle/del_archivedlog_log 2>&1
2>&1:表示无论脚本执行是否正常,都要把执行过程写入log文件del_archivedlog_log
删除两天前的归档日志
最新推荐文章于 2022-12-12 21:45:12 发布