User Tools

Site Tools


castor:transferzh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
castor:transferzh [2010/08/02 13:37] abuechlecastor:transferzh [2014/02/05 15:26] (current) – [How to] nchiap
Line 1: Line 1:
 ====== Copying Files from CASTOR to Zuerich directly ====== ====== Copying Files from CASTOR to Zuerich directly ======
 +** Note: ** [[grid:transferzh | Transfer Instructions for Grid]]
 +
 ===== How to ===== ===== How to =====
 In order to copy files directly from CASTOR to a machine in Zurich, login to the machine grid-ui. There do In order to copy files directly from CASTOR to a machine in Zurich, login to the machine grid-ui. There do
Line 13: Line 15:
  
 ** Note: ** You need a Grid Certificate to do this! ** Note: ** You need a Grid Certificate to do this!
 +
 +
 +===== Multi-File Loop =====
 +If you want to transfer several files, Create a file containing a list like this
 +<file txt files.txt>
 +/castor/cern.ch/user/n/nchiapol/my-file-1.root
 +/castor/cern.ch/user/n/nchiapol/my-file-2.root
 +</file>
 +
 +Now you can use the following one-liner to get all the files
 +<code bash>
 +for f in `cat files.txt`; do lcg-cp -v srm://srm-lhcb.cern.ch:8443/srm/managerv2?SFN=$f file://disk/data1/hep/nchiapol/targetDir/${f##*/}; done
 +</code>
 +''${f##*/}'' is the basename (e.g. my-file-1.root). You could probably use ''`basename $f`'' instead.
  
 ===== Transfer with a Script ===== ===== Transfer with a Script =====
castor/transferzh.1280749078.txt.gz · Last modified: 2010/08/02 13:37 by abuechle