标签:
[root@BMS020 source]# cat tarsourcereq.sh
#!/bin/bash
set -x
. /etc/profile
#LOGFILE="/tmp/tarreq.log"
DIR="/opt/onlineorder/source/"
cd $DIR
for i in `find . -type d -mtime +3 | grep -v gz`
do
tar cvzf $i.tar.gz $i
rm -rf $i
done
exit
标签:
原文地址:http://www.cnblogs.com/lubing666666/p/4462889.html