ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/yiiyama/Toolset/scripts/t2tools
Revision: 1.3
Committed: Tue Nov 20 17:21:59 2012 UTC (12 years, 5 months ago) by yiiyama
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +6 -3 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 yiiyama 1.1 which voms-proxy-init 2>/dev/null || source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh
2    
3     voms-proxy-init -voms cms
4    
5     t2ls(){
6 yiiyama 1.2 path=$1 #path under yiiyama
7 yiiyama 1.1 srmls srm://srm-dcache.rcac.purdue.edu:8443/srm/v2/server?SFN=/mnt/hadoop/store/user/yiiyama/${path}
8     }
9    
10     t2up(){
11 yiiyama 1.2 local=$1 #full path
12     remote=$2 #path under yiiyama
13 yiiyama 1.1 lcg-cp -b -D srmv2 file://${local} srm://srm-dcache.rcac.purdue.edu:8443/srm/v2/server?SFN=/mnt/hadoop/store/user/yiiyama/${remote}
14     }
15    
16     t2down(){
17 yiiyama 1.2 remote=$1 #path under yiiyama
18     local=$2 #full path
19 yiiyama 1.1 lcg-cp -b -D srmv2 srm://srm-dcache.rcac.purdue.edu:8443/srm/v2/server?SFN=/mnt/hadoop/store/user/yiiyama/${remote} file://${local}
20     }
21    
22     t2rm(){
23 yiiyama 1.2 remote=$1 #path under yiiyama
24 yiiyama 1.1 lcg-del -b -l -D srmv2 srm://srm-dcache.rcac.purdue.edu:8443/srm/v2/server?SFN=/mnt/hadoop/store/user/yiiyama/${remote}
25 yiiyama 1.2 }
26    
27     dcachedown(){
28 yiiyama 1.3 #from a FNAL node
29 yiiyama 1.2 remote=$1 #path under /pnfs/cms/WAX
30     local=$2 #full path
31 yiiyama 1.3 lcg-cp -b -D srmv2 srm://cmssrm.fnal.gov:8443/srm/managerv2?SFN=/$remote file:///$local
32 yiiyama 1.2 }
33    
34     fnaleosdown(){
35     remote=$1 #path under /eos/uscms
36     local=$2 #full path
37 yiiyama 1.3 lcg-cp -b -D srmv2 srm://cmseos.fnal.gov:8443/srm/v2/server?SFN=/eos/uscms$remote file:///$local
38 yiiyama 1.2 }
39    
40     dcache2eos(){
41 yiiyama 1.3 #from a FNAL node
42 yiiyama 1.2 fnal=$1 #path under /pnfs/cms/WAX
43     cern=$2 #path under /store/user/yiiyama
44 yiiyama 1.3 caf=$3/
45     lcg-cp -b -D srmv2 srm://cmssrm.fnal.gov:8443/srm/managerv2?SFN=/$fnal srm://srm-eoscms.cern.ch:8443/srm/v2/server?SFN=//eos/cms/store/${caf}user/yiiyama$cern
46 yiiyama 1.2 }
47    
48     #fnaleos2eos needs to be done from FNAL
49     # fnal=$1 #path under /eos/uscms
50     # cern=$2 #path under /store/user/yiiyama
51     # lcg-cp -b -D srmv2 file:///eos/uscms$fnal srm://srm-eoscms.cern.ch:8443/srm/v2/server?SFN=/eos/cms/store/user/yiiyama$cern