- Timestamp:
- 01/10/06 22:12:58 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/movingsubsystemfiles
r7426 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 # 27 # This script is moving the subsystemfiles from the directory 28 # /magic/datacenter/fromtape to the structure 29 # /magic/subsystemdata/subsystem/YYYY/MM/DD 30 # 26 31 27 32 umask 0002 28 33 34 # change permission for files 35 # perhaps needed as the tapes are read by the user tape 29 36 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/{ccdata,cacodata,amc,daqlog}/* 30 37 38 # find subsystem files 31 39 subsysfiles=`find /magic/datacenter/fromtape/ccdata/ -name '*.*'` 32 40 subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/daqlog/ -name '*.*'`) … … 34 42 subsysfiles=("${subsysfiles[@]}" `find /magic/datacenter/fromtape/amc/ -name '*.*'`) 35 43 44 # moving subsystem files 36 45 for subsysfile in ${subsysfiles[@]} 37 46 do 38 # echo "file: "$subsysfile39 47 newsubsysfile=`echo $subsysfile | sed -e 's/datacenter\/fromtape/subsystemdata/g' -e 's/daqlog/daq__/g' -e 's/ccdata/cc/g' -e 's/cacodata/caco/g' -e 's/_/\//1' -e 's/_/\//1' -e 's/\/\///g'` 40 # echo "new file: "$newsubsysfile41 48 newdir=`dirname $newsubsysfile` 42 # echo "newdir: "$newdir43 49 if [ ! -d $newdir ] 44 50 then … … 48 54 49 55 mv -v $subsysfile $newsubsysfile 50 51 56 done 52 57
Note:
See TracChangeset
for help on using the changeset viewer.