#!/bin/sh date=`date -d 'yesterday' +%Y-%m-%d`; #echo $date; rm -rf /apps/appsvc/CMBO/logs/sms/BACKUP*; mkdir /apps/appsvc/CMBO/logs/sms/BACKUP.$date; #gzip $(find /apps/appsvc/CMBO/logs/sms -name "*`date -d 'yesterday' +%Y-%m-%d`.log" -type f ); gzip /apps/appsvc/CMBO/logs/sms/*`date -d 'yesterday' +%Y-%m-%d`.log; mv /apps/appsvc/CMBO/logs/sms/*.gz /apps/appsvc/CMBO/logs/sms/BACKUP.$date;