# /bin/crontab -e
#ident "@(#)root 1.19 98/07/06 SMI" /* SVr4.0 1.1.3.1 */
#
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
10 3 * * 0,4 /etc/cron.d/logchecker
10 3 * * 0 /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
00 20 * * * su - oracle -c "/oracle/daily_exp.sh"
Bash
# vi /oracle/daily_exp.sh
rm /BACKUP/Daily_Export/5/*.*
mv /BACKUP/Daily_Export/4/*.* /BACKUP/Daily_Export/5
mv /BACKUP/Daily_Export/3/*.* /BACKUP/Daily_Export/4
mv /BACKUP/Daily_Export/2/*.* /BACKUP/Daily_Export/3
mv /BACKUP/Daily_Export/1/*.* /BACKUP/Daily_Export/2
FILE1=/BACKUP/Daily_Export/1/daily_exp`date +%y%m%d%H%M`.dmp
FILE2=/BACKUP/Daily_Export/1/daily_exp`date +%y%m%d%H%M`.log
exp system/manager file=$FILE1 log=$FILE2 full=y
Bash
최신 dmp를 /BACKUP/Daily_Export/1/ 에 저장하고,
가장 오래된 /BACKUP/Daily_Export/5/에 저장된 dmp를 제거한다.