2011년 3월 10일 목요일

shell script for deleting logfile

1. create shell script

#!/bin/ksh
find /logs/log -type f -ctime +2 | xargs -i rm -f {} >/dev/null 2>&1


2. regist crontab

59 23 * * * /var/spool/cron/log_backup.sh >/dev/null 2>&1

댓글 없음:

댓글 쓰기