标签:sp on 文件 bs ad as nbsp br file
#!/bin/bash
filename=`date -d today +"%Y%m%d"`
CU=home/pboc/htsys/datafile/upload/cu
BAK=home/pboc/htsys/datafile/upload/cubak/$filename
REC=home/pboc/htsys/datafile/rec
mkdir -p /$BAK
cd /$CU
while :
do
mstore=`du -s`
sleep 5
nstore=`du -s` # = 前后是不能有空格的,不然会报错,du查看占用空间的,df查看磁盘占用率的
if(mstore==nstore)
then
break
fi
done
rename FH CU_HDM_FH FH*
rename DT CU_HDM_DT DT*
rename DF CU_HDM_DF DF*
rename DR CU_HDM_DR DR*
rename BR CU_HDM_BR BR*
rename SA CU_HDM_SA SA*
rename WL CU_HDM_WL WL*
#rename FH CU_HDM_FH FH*
#rename FH CU_HDM_FH FH*
#rename FH CU_HDM_FH FH*
cp -p /$CU/* /$REC
cp -p /$CU/* /$BAK
cd /$CU
rm -rf *
标签:sp on 文件 bs ad as nbsp br file
原文地址:http://my.oschina.net/u/2252538/blog/352294