Differences

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

Link to this comparison view

en:afs_la_commande_cp [2016/12/16 10:16] (current)
Line 1: Line 1:
 +Last modified: Mar 09, 2015 by Calvat\\
 +\\
 +
 +====== AFS: the cp command ======
 +
 +\\
 +\\
 +
 +=====  Definition ​ =====
 +
 +The AFS **cp** command allows the user to copy a file or a directory (-r) from an AFS place to another. These two places can be on the same AFS cell or not. In the second case, you should do [[:​en:​afs_authentification_et_acl|kinit + aklog/​afslog]] on the other cell. The path can be given in an absolute way ( ///​afs/​in2p3.fr/​home/​d/​dupont/​Repertoire//​ for example or //​~/​Repertoire//​ ) or relatively from the base directory //​Repertoire//​ . It is neccessary that **AFS** is installed on the two servers that should take together to execute your copy.
 +=====  Syntaxe ​ =====
 +
 +
 +  *Copy of a file in the same AFS cell:
 +<​code>​
 +> cp path1/file1 path2/file2
 +> cp ~/​path3/​file3 .
 +</​code>​
 +Copy of a directory, eventually with sub-directories,​ to an other directory in the same AFS cell:
 +<​code>​
 +> cp -r path1/dir1 path2
 +</​code>​
 +  *Copy of a file to an other AFS cell (from IN2P3 to CERN for example):
 +<​code>​
 +> cp path1/file1 /​afs/​cern.ch/​home/​t/​toto/​path2/​file2
 +> cp ~/​path3/​file3 /​afs/​cern.ch/​home/​t/​toto/​path4/​file4
 +> cp /​afs/​in2p3.fr/​home/​d/​dupont/​path3/​file3 /​afs/​cern.ch/​home/​t/​toto/​path4/​file4
 +</​code>​
 +Attention, you should be authenticated to the other cell.
 +Copy of a file from an other AFS cell (from CERN to IN2P3 for example):
 +<​code>​
 +> cp /​afs/​cern.ch/​home/​t/​toto/​path1/​file1 ~/​path2/​file2
 +> cp /​afs/​cern.ch/​home/​t/​toto/​path1/​file1 /​afs/​in2p3.fr/​home/​d/​dupont/​path2/​file2
 +</​code>​
 +
 +
  
  • en/afs_la_commande_cp.txt
  • Last modified: 2016/12/16 10:16
  • (external edit)