-- YurySmirnov - 15-Sep-2011

EOS usage Notes

  • Uploading files: xrdcp /tmp/daq.ATLAS.0091361.physics.IDCosmic.LB0036.SFO-3._0002.data root://eosatlas//eos/atlas/user/y/ysmirnov/91361/abc.root

  • Uploading folders: xrdcp -r myfolder root://eosatlas//eos/atlas/user/y/ysmirnov/myfolder2

it will copy this directory myfolder into EOS with all its content Warning, important but if myfolder contains any subfolders like myfolder/test1, myfolder/test2 with files myfolder/test1/file1.txt, myfolder/test1/file2.txt, myfolder/test2/file3.txt, myfolder/test2/file4.txt etc. those files file?.txt will appear in myfolder2/, not in myfolder2/test1/, or myfolder2/test2/ and test1 and test2 won't exist in EOS at all!

  • Downloading files: xrdcp root://eosatlas//eos/atlas/user/y/ysmirnov/foldername/file.ext path/filename.ext

  • Downloading folders: xrdcp -R root://eosatlas//eos/atlas/y/ysmirnov/somefolder  myfolder/

Creates myfolder and copies the content of somefolder in myfolder. Warning, important Note the trailing slash after myfolder - it is mandatory!!

Warning, important If somefolder had any subfolders, their content will be right inside the myfolder (subfolders won't be created). Try looping over the subfolders to avoid it:

for current_subfolder in `eos ls /eos/atlas/user/y/ysmirnov/somefolder`; do echo Now downloading from subfolder $current_subfolder; xrdcp -R root://eosatlas//eos/atlas/user/y/ysmirnov/somefolder/$current_subfolder $current_subfolder/; done

Warning, important It looks like xrdcp -R stopped working in the latest version of xrdcp. To copy folders, try looping over all files in a given folder:

for current_file in `eos ls  /eos/atlas/user/y/ysmirnov/somefolder`; do echo Now downloading $current_file:; xrdcp root://eosatlas//eos/atlas/user/y/ysmirnov/somefolder/$current_file $current_file; done

  • Listing content: eos ls -l /eos/atlas/user/y/ysmirnov , file size is in bytes

  • EOS-EOS file copying: xrdcp root://eosatlas//eos/atlas/user/y/ysmirnov/somefolder1/my_filename1.ext root://eosatlas//eos/atlas/user/y/ysmirnov/somefolder2/my_filename2.ext

  • Creating folder: eos mkdir /eos/atlas/user/y/ysmirnov/ROS

  • Deleting file: eos rm /eos/atlas/user/y/ysmirnov/ROS-19Dec-3118.root

  • Deleting folder: eos rm -r /eos/atlas/user/y/ysmirnov/zmumu

  • Renaming file: Didn't find any way to do that yet

  • Renaming folder: Didn't find any way to do that yet

  • Checking quota: eos quota | grep -A 4 "Quota Node: /eos/atlas/user/$" | head -5 | tail -4

  • Mounting to lxplus: first create a directory inside your lxplus account (e.g., ~/eos):

mkdir ~/eos

then mount

eosmount ~/eos

After you finished working, unmount it with

eosumount ~/eos

In case of any troubles (eos[u]mount not found on your system or you forgot to unmount it last time or whatever) look for solutions here

  • Accessing files from e.g. lxbatch: you can access your .root files from lxplus or even from lxbatch using something like this in your script:
int NFiles = myChain->Add("root://eosatlas//eos/atlas/user/y/ysmirnov/QBALLS_MC12_D3PDS_FROM_OFFICIAL_dESDMRPVLLs/user.ysmirnov.LLPD3PDMaker-00-02-08_M300Q6_fromOfficialdESDM_RPVLLs_25July2013_v01/*.root");

Wildcards are allowed! But nothing works if EOS is currently mounted in lxplus. So first unmount it then use the above recipe.

More on this: EOS twiki page

Edit | Attach | Watch | Print version | History: r21 < r20 < r19 < r18 < r17 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r21 - 2018-02-24 - YurySmirnov
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback