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