You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

10 lines
194 B

#!/bin/bash
#脚本出错时中断执行
set -e
if [ ! -d ../logHistory ];then
mkdir ../logHistory
fi
TIME=`date "+%Y_%m_%d_%H_%M_%S"`
tar zcvf ../logHistory/${TIME}.tgz ../log
rm -rf ../log/*