首页 > 代码库 > FTP文件判断

FTP文件判断

#!/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 *


FTP文件判断