ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/yiiyama/Toolset/scripts/t2tools
Revision: 1.2
Committed: Mon Nov 12 16:59:58 2012 UTC (12 years, 5 months ago) by yiiyama
Branch: MAIN
Changes since 1.1: +30 -7 lines
Log Message:
*** empty log message ***

File Contents

# Content
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 path=$1 #path under yiiyama
7 srmls srm://srm-dcache.rcac.purdue.edu:8443/srm/v2/server?SFN=/mnt/hadoop/store/user/yiiyama/${path}
8 }
9
10 t2up(){
11 local=$1 #full path
12 remote=$2 #path under yiiyama
13 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 remote=$1 #path under yiiyama
18 local=$2 #full path
19 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 remote=$1 #path under yiiyama
24 lcg-del -b -l -D srmv2 srm://srm-dcache.rcac.purdue.edu:8443/srm/v2/server?SFN=/mnt/hadoop/store/user/yiiyama/${remote}
25 }
26
27 dcachedown(){
28 remote=$1 #path under /pnfs/cms/WAX
29 local=$2 #full path
30 lcg-cp -b -D srmv2 srm://cmssrm.fnal.gov:8443/srm/managerv2?SFN=$remote file://$local
31 }
32
33 fnaleosdown(){
34 remote=$1 #path under /eos/uscms
35 local=$2 #full path
36 lcg-cp -b -D srmv2 srm://cmseos.fnal.gov:8443/srm/v2/server?SFN=/eos/uscms$remote file://$local
37 }
38
39 dcache2eos(){
40 fnal=$1 #path under /pnfs/cms/WAX
41 cern=$2 #path under /store/user/yiiyama
42 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/user/yiiyama$cern
43 }
44
45 #fnaleos2eos needs to be done from FNAL
46 # fnal=$1 #path under /eos/uscms
47 # cern=$2 #path under /store/user/yiiyama
48 # 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