[root@BMS020 bak]# cat tarbakreq.sh #!/bin/bashset -x. /etc/profile#LOGFILE="/tmp/tarreq.log"DIR="/opt/onlineorder/bak/"cd $DIRfor i in `find . -type d -mtime +3 | grep -v gz`do tar cvzf $i.tar.gz $i rm -rf $idoneexit