Changeset 9091 for trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
- Timestamp:
- 08/05/08 12:31:49 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
r9081 r9091 51 51 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1 52 52 53 printprocesslog "INFO moving directories from muxdata to rawdata" 54 # find directories which have to be copied 55 days=`find /magic/datacenter/fromtape/muxdata/* -type d` 56 if [ ! "$days" == "" ] 57 then 58 # move directories to the tapedirectory 59 mv -v $days /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1 60 fi 61 62 # find rawfiles 63 rawfiles=`find /magic/{datacenter,data/rawfiles}/fromtape/*data/ -regextype posix-egrep -regex '.*/20[01][0-9]{5}_(M[12]_)?[0-9]{8}(\.[0-9]{3})?_.*.raw' -type f` 53 # find rawfiles belonging to tape (don't move files not yet md5-sum checked) 54 rawfiles=`find /magic/{datacenter,data/rawfiles}/fromtape/???data/ -regextype posix-egrep -regex '.*/20[01][0-9]{5}_(M[12]_)?[0-9]{8}(\.[0-9]{3})?_.*.raw' -type f -user tape` 64 55 65 56 if [ "$rawfiles" == "" ] … … 69 60 fi 70 61 62 # move rawfiles 71 63 printprocesslog "INFO moving rawfiles to $datapath/rawfiles" 72 64 for rawfile in $rawfiles … … 77 69 if [ "$path" == "datacenter" ] 78 70 then 79 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'` 71 subpath=`dirname $rawfile | cut -d/ -f5` 72 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/'${subpath}'/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'` 80 73 elif [ "$path" == "data" ] 81 74 then … … 93 86 done 94 87 95 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/ *data/* >> $scriptlog 2>&188 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/???data/* >> $scriptlog 2>&1 96 89 97 90 printprocesslog "INFO launching filesondisk"
Note:
See TracChangeset
for help on using the changeset viewer.