cd /data/cdt_api/logs/ && gzip *.log.`date +%F -d 'yesterday'`
error.log.2017-07-28.gz
error.log.2017-07-29.gz
error.log.2017-07-30.gz
cd /data/cdt_api/logs/ && gzip *.log.`date +%F -d 'yesterday'`
error.log.2017-07-28.gz
error.log.2017-07-29.gz
error.log.2017-07-30.gz
转载于:https://www.cnblogs.com/qingchen-24K/p/7270588.html