Skip to content

Commands

Gautier Debaecker edited this page Jan 14, 2025 · 1 revision

Here are all the possible command in api_easicmd.py (can be obtain with api_easicmd.py --help) :

    add_meta	: add_meta or add_meta [irods path]
          if you don't give an irods path you'll be asked an option ([f] for file or [C] for a folder) then you will have to chose your object help by autocompletion

  add_path  : add additional path to your irods path autocompletion (e.g : not my home but a common folder for a project)(stock in a file [~/.irods_additional_path_save.pkl] for later)

    build_dico_meta : create a file in your home directory containing the dictionary with your metadata attribute and value.
                    As it's in local you just to have to run this the first time and when you add metadata it will be update.
                    This is usefull because when you have many file in your irods vault it take a very long time to get this dictionary if you have to do it every time you need the autocompletion for metadata 

    help	: print this help and leave
  
    ichmod	: give right to other user/group over some of your data (e.g give read right over one iCollection)

    idush	: equivalent to du -sh for an irods folder

    imkdir	 : imkdir -p reinforce by autocompletion

    irm	: irm [option]
         options are [-f] for a file and [-C] for a folder 
         allow to irm one or multiple (if * used) folder/file in irods. You don't need to know the path in irods as it will be helped by autocompletion

  new_user: create a new config file correponding to another irods user/zone

    pull	: pull [option] [local path]
          irsync/iget folder/file from irods to local with autocompletion
          For a file add option -f
          For a folder add option -C
          path can be full path or '.' for current folder
          if no path given, a list of all the folder from root will be proposed (can be very long if you have many)

    push	: irsync/iput folder/file (given by a path) from local to irods with auto completion

    rm_meta	: rm_meta or rm_meta [irods path]
          if you don't give an irods path you'll be ask an option ([f] for file or [C] for a folder) then you will have to chose your object help by autocompletion
  
  rm_path: remove additional path you already add but don't need anymore

    search_by_meta	: search_by_meta [option] or search_by_meta
         option are [-f] for a file, [-C] for a folder and [-u] for a user

    search_name	: search_name [option]
         option are [-f] for a file and [-C] for a folder 
         search for a file or a folder in irods

    show_meta	: show_meta [option] or show_meta
         option are [-f] for a file and [-C] for a folder
 
  switch_user : allow to switch between the differents users provided

    synchro	: synchro [local path to folder] [optional:irods path]
         synchronise the contain of a local folder with irods [in irods path if given or in /zone/home/user by default] based on the sha256 
         can be fully automated with the help of when-changed (https://github.com/joh/when-changed) with : when-changed -r -q [folder] -c 'easicmd.py synchro [folder]'
Clone this wiki locally