Changeset 9081 for trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
- Timestamp:
- 08/04/08 13:41:17 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
r8682 r9081 21 21 # Author(s): Stefan Ruegamer 02/2007 <mailto:snruegam@astro.uni-wuerzburg.de> 22 22 # 23 # Copyright: MAGIC Software Development, 2000-200 723 # Copyright: MAGIC Software Development, 2000-2008 24 24 # 25 25 # … … 50 50 # change permission for files 51 51 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1 52 # output for chmod with -v or -c (only changes)53 54 # outdated, .finished files are no longer used55 #printprocesslog "INFO moving directories from fromlapalma to fromtape"56 # find directories which have to be copied57 #dirs=`ls /magic/datacenter/fromlapalma/RAWchk/*/*.finished | sed -e 's/RAWchk/RAW/g' | cut -d/ -f1-6`58 #if [ ! "$dirs" == "" ]59 #then60 # change permission for this directories61 #ssh lapalma@dc09 chmod -R g+w $dirs >> $scriptlog 2>&162 # move directories to the tapedirectory63 #mv -v $dirs /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&164 #fi65 52 66 53 printprocesslog "INFO moving directories from muxdata to rawdata" … … 73 60 fi 74 61 75 76 62 # find rawfiles 77 rawfiles=`find /magic/ datacenter/fromtape/rawdata/ -name '*.*'`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` 78 64 79 65 if [ "$rawfiles" == "" ] … … 88 74 # workaround for rawfiles with wrong timing 89 75 # newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'` 90 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'` 76 path=`dirname $rawfile | cut -d/ -f3` 77 if [ "$path" == "datacenter" ] 78 then 79 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'` 80 elif [ "$path" == "data" ] 81 then 82 newrawfile=`echo $rawfile | sed -e 's/\/fromtape\/muxdata//g' -e 's/_/\//1' -e 's/_/\//1'` 83 else 84 echo "ERROR something is wrong with the path of file $rawfile -> continue" >> $scriptlog 2>&1 85 printprocesslog "ERROR moving rawfile $rawfile failed" 86 continue 87 fi 88 91 89 newdir=`dirname $newrawfile` 92 90 makedir $newdir >> $scriptlog 2>&1 … … 95 93 done 96 94 97 rmdir -v /magic/ datacenter/fromtape/rawdata/* >> $scriptlog 2>&195 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/*data/* >> $scriptlog 2>&1 98 96 99 97 printprocesslog "INFO launching filesondisk" 100 98 echo "launching filesondisk" >> $scriptlog 2>&1 101 $scriptspath/filesondisk &99 $scriptspath/filesondisk & 102 100 103 101 finish >> $scriptlog 2>&1 104
Note:
See TracChangeset
for help on using the changeset viewer.