Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:45

0001 #!/bin/sh
0002 if [ "$1" == "" ]; then
0003    echo "Usage: $0 <older than (sec)>"
0004    exit 1
0005 fi
0006 
0007 ARCHDIR=archive
0008 
0009 current=`date +%s`
0010 olderthan=`expr $current - $1`
0011 echo $current $olderthan
0012 for file in `ls *SM*.root`
0013 do
0014   time=`echo $file | awk -F _ '{print $2}' | cut -c 1-10`
0015   if [ $time -le $olderthan ]; then
0016      echo "Moving file $file in $ARCHDIR"
0017      mv $file ${ARCHDIR}/
0018   fi
0019 done
0020 
0021 for file in `ls SkimSM*.log`
0022 do
0023   time=`echo $file | awk -F _ '{print $2}' | cut -c 1-10`
0024   if [ $time -le $olderthan ]; then
0025      echo "Moving file $file in $ARCHDIR"
0026      mv $file ${ARCHDIR}/
0027   fi
0028 done
0029 
0030 for file in `ls SkimSM*.py`
0031 do
0032   time=`echo $file | awk -F _ '{print $2}' | cut -c 1-10`
0033   if [ $time -le $olderthan ]; then
0034      echo "Moving file $file in $ARCHDIR"
0035      mv $file ${ARCHDIR}/
0036   fi
0037 done
0038 
0039 # archive all ig files.....
0040 mv *.ig  ${ARCHDIR}/