Command Line Tip |
---|
Note that iCommands cannot be used to upload files into Data Store via URL from other sites (ftp, http, etc.). To transfer data from an external site, you first must download the file to a local machine using wgetor a similar mechanism, and then use iput to upload it to the Data Store. |
iRODS 4 is installed as a standard package to the operating system on every node. This means you will not have to "module load irods". You will still need to "iinit" the first time (see below). iRODS is also available on the filexfer node for use. Initializing iRODS
Running iinit for any system using iRODS 4.x, unlike its iRODS3 counterpart, does not help you set up the environment. Instead, you need to run create_irods_env with suitable options for the iRODS host, zone, username,etc manually. For this key: | Enter this: |
---|
-h | <hostname of iRODS server> | -p | <port number of iRODS server> (1247 is default) | -z | <Zone name of iRODS zone> | -u | <user name on the iRODS server> (may not match your netid) | -a | <authentication method for the iRODS server> (PAM, native,...) |
For example: Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
| $ create_irods_env -a native -h someserver.somewhere.net -z MYZONE |
will suffice to create an appropriate ~/.irods/irods_environment.json file to allow you to run iinit; we took the default -p 1247, -u <your NetId> in the above example by omitting -p and -u. You only need to do this step ONE time; subsequent times you will just run iinit and it will asked for your password. Note create_irods_env will NOT overwrite or alter an existing ~/.irods/irods_environment.json file. Once the ~/.irods/irods_environment.json file is created properly, you should be able to sign in to the iRods server your selected using iinit, viz: Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
| $ iinit
Enter your current ... password: # enter your iRODS server password here |
At this point you can use other iRods commands such as icp to move files.
Expand |
---|
title | Click here for some common iRODS commands |
---|
|
Command | Description |
---|
icd | Changes working directory | ichmod | For help, enter ichmod -h. | ichmod read | Grant read-only permission level for specified user to selected file or folder. | ichmod write | Grant read and write permission level for specified user to selected file or folder. | ichmod own | Grant full ownership permission level for specified user to selected file or folder | ichmod null | Remove permission level for the user to the file or folder | iexit | Log off/disconnect from the Data Store. | iget | Download file/directory from iRODS to local device | iinit | Initialize and start the connection to iRODS | ils | Lists contents of current working directory. For help, enter ils -h | ils -A | Lists directory permissions | imkdir | Creates new directory | iput | Uploads file/directory from local device to iRODS | ipwd | Shows name and path of current remote folder | irm | Moves a file to the trash | irm -f | Deletes a file. | irm -r | Moves a folder to the trash. | irm -fr | Deletes a folder. |
|
ExamplesIn the following examples: - my-files-to-transfer/ is the example name of the directory or folder for bulk transfers.
- my-file-to-transfer.txt is the example name for single file transfers.
- Any filename may be used for the checkpoint-file.
Bulk Files Transfer Example
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
| iput -P -b -r -T --retries 3 -X checkpoint-file my-files-to-transfer/ |
Single Large File Transfer Example Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
| iput -P -T --retries 3 --lfrestart checkpoint-lf-file my-file-to-transfer.txt |
|