Changeset 9355 for trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
- Timestamp:
- 02/19/09 21:22:19 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
r9198 r9355 41 41 umask 0002 42 42 43 scriptlog=$runlogpath/$program-$datetime.log44 date >> $scriptlog 2>&145 46 43 # check whether script is already running 47 44 lockfile=$lockpath/lock-$program.txt 48 checklock >> $scriptlog 2>&145 checklock 49 46 50 47 # change permission for files 51 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&148 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* 52 49 53 50 # find rawfiles belonging to tape (don't move files not yet md5-sum checked) … … 56 53 if [ "$rawfiles" == "" ] 57 54 then 58 echo "no files to move -> exit" >> $scriptlog 2>&159 finish >> $scriptlog 2>&155 printprocesslog "INFO no files to move -> exit" 56 finish 60 57 fi 61 58 … … 75 72 newrawfile=`echo $rawfile | sed -e 's/\/fromtape\/muxdata//g' -e 's/_/\//1' -e 's/_/\//1'` 76 73 else 77 echo "ERROR something is wrong with the path of file $rawfile -> continue" >> $scriptlog 2>&178 74 printprocesslog "ERROR moving rawfile $rawfile failed" 79 75 continue … … 81 77 82 78 newdir=`dirname $newrawfile` 83 makedir $newdir >> $scriptlog 2>&179 makedir $newdir 84 80 85 mv -v $rawfile $newrawfile >> $scriptlog 2>&181 mv -v $rawfile $newrawfile 86 82 done 87 83 88 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/???data/* >> $scriptlog 2>&184 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/???data/* 89 85 90 86 printprocesslog "INFO launching filesondisk" 91 echo "launching filesondisk" >> $scriptlog 2>&192 87 $scriptspath/filesondisk & 93 88 94 finish >> $scriptlog 2>&189 finish
Note:
See TracChangeset
for help on using the changeset viewer.