Exemplo n.º 1
0
void
usage() {
    char *msgs[] = {
        "Usage : ichksum [-harvV] [-K|f] [-n replNum] [-R resource] [--silent]",
        "           dataObj|collection ... ",
        "Checksum one or more data-object or collection from iRODS space.",
        "Options are:",
        " -f  force - checksum data-objects even if a checksum already exists in iCAT",
        " -a  checksum all replicas. ils -L should be used to list the values of all replicas",
        " -K  verify the checksum value in iCAT. If the checksum value does not exist,",
        "     compute and register one.",
        " -n  replNum  - the replica to checksum; use -a to checksum all replicas.",
        " -R  resource  - the resource of the replica to checksum,",
        " -r  recursive - checksum the whole subtree; the collection, all data-objects",
        "     in the collection, and any subcollections and sub-data-objects in the",
        "     collection.",
        " --silent  - No checksum output except error",
        " -v  verbose",
        " -V  Very verbose",
        " -h  this help",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "ichksum" );
}
Exemplo n.º 2
0
/*
Print the main usage/help information.
 */
void usage() {
    char *msgs[] = {
        "Usage: iquota [-uavVh] [UserName] [usage]",
        " ",
        "Show information on iRODS quotas (if any).",
        "By default, information is displayed for the current iRODS user.",
        " ",
        "The 'over' values indicate whether the user or group is over quota",
        "or not and by how much; positive values are over-quota.",
        "The 'usage' information shows how much data is stored on each resource,",
        "when last determined.",
        " ",
        "Options:",
        "-a All users",
        "-u UserName[#ZoneName]  - for the specified user",
        "usage     - show usage information",
        " ",
        "Examples:",
        "iquota",
        "iquota -a",
        "iquota usage",
        "iqouta -a usage",
        "iquota -u josh",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "iquota" );
}
Exemplo n.º 3
0
Arquivo: iscan.cpp Projeto: nesi/irods
void
usage() {
    char *msgs[] = {
        "Usage: iscan [-drh] srcPhysicalFile|srcPhysicalDirectory|srcDataObj|srcCollection",
        "If the input is a local data file or a local directory, it checks if the content is registered in iRODS.",
        "Full path must be used for local files and directories.",
        "If the input is an iRODS file or an iRODS collection, it checks if the physical files corresponding ",
        "to the iRODS object does exist on the data servers. Scanning data objects and collections may only be ",
        "performed by a rodsadmin.",
        "If the operation is successful, nothing will be output and 0 will be returned.",
        "Options are:",
        " -r  recursive - scan local subdirectories or subcollections",
        " -h  this help",
        " -d  scan data objects in iRODS (default is scan local objects)",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "iscan" );
}
Exemplo n.º 4
0
void
usage(char *option)
{
   char *Msgs[]={
"Usage: isysmeta [-lvVh] [command]",
" Show or modify system metadata.",
"Commands are:",
" mod DataObjectName Time (modify expire time)",
" mod DataObjectName datatype Type (modify data-type)",
" mod DataObjectName comment [replNum] Comment (modify the comment of the replica replNum or 0 by default)",
" ls [-lvV] Name (list dataObject, -l -v for long form)",
" ldt (list data types (those available))",
" ",
"Time can be full or partial date/time: '2009-12-01' or '2009-12-11.12:03'",
"etc, or a delta time '+1h' (one hour from now), etc.",
" ",
"Examples:",
" isysmeta mod foo +1h (set the expire time for file 'foo' to an hour from now)",
" isysmeta mod /tempZone/home/rods/foo 2009-12-01",
" isysmeta mod /tempZone/home/rods/foo datatype 'tar file'",
" isysmeta mod /tempZone/home/rods/dbo1 datatype 'database object'",
" isysmeta mod /tempZone/home/rods/foo comment 1 'my comment'",
" isysmeta ls foo",
" isysmeta -l ls foo",
" isysmeta ls -l foo",
" isysmeta ldt",
""};

   printMsgs(Msgs);
   printReleaseInfo("isysmeta");
}
Exemplo n.º 5
0
/*
Print the main usage/help information.
 */
void usage() {
    char *msgs[] = {
        "ilsresc lists iRODS resources",
        "Usage: ilsresc [-lvVh] [--tree] [--ascii] [Name]",
        "If Name is present, list only that resource, ",
        "otherwise list them all ",
        "Options are:",
        " -l Long format - list details",
        " -v verbose",
        " -V Very verbose",
        " -z Zonename  list resources of specified Zone",
        " --tree - tree view",
        " --ascii - use ascii character set to build tree view (ignored without --tree)",
        " -h This help",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "ilsresc" );
}
Exemplo n.º 6
0
void
usage ()
{
    char *msgs[]= {
        "Usage : iexecmd [-hv] [-p hintPath]|[-P hintPath] [-H hostAddr] command",
        "Remotely Execute a command installed in the server/bin/cmd directory of ",
        "the server.",
        "The input parameter 'command' is the remote command to execute. Input",
        "arguments  for the command is supported by appending arguments to the",
        "command to be executed. The command and arguments must be in quotes to",
        "differentiate the arguments from the arguments of the iexecmd. e.g.:",
        "    iexecmd -H zero.sdsc.edu \"hello Mary\"",
        "If neither -H, -p nor -P is specified, the command will be executed on",
        "the host where the client is connected.",
        " ",
        "Options are:",
        " -H  hostAddr - the host address where the command will be executed.",
        " -p  hintPath - A full iRODS file path. The command will be executed on",
        "      the host where this file is stored.",
        " -P  hintPath - Same as the -p option except that the resolved pphysical",
        "      path from the logical hintPath will be used as the first argument",
        "      the command",
        " -v  verbose",
        " -h  this help",
        ""
    };
    int i;
    for (i=0;; i++) {
        if (strlen(msgs[i])==0) break;
        printf("%s\n",msgs[i]);
    }
    printReleaseInfo("iexecmd");
}
Exemplo n.º 7
0
void usage( char *prog ) {
    printf( "Shows your iRODS Current Working Directory.\n" );
    printf( "Usage: %s [-vVh]\n", prog );
    printf( " -v  verbose\n" );
    printf( " -V  very verbose\n" );
    printf( " -h  this help\n" );
    printReleaseInfo( "ipwd" );
}
Exemplo n.º 8
0
void usage( char *prog ) {
    printf( "Exits iRODS session (cwd) and optionally removes\n" );
    printf( "the scrambled password file produced by iinit.\n" );
    printf( "Usage: %s [-vh] [full]\n", prog );
    printf( "If 'full' is included the scrambled password is also removed.\n" );
    printf( " -v  verbose\n" );
    printf( " -V  very verbose\n" );
    printf( " -h  this help\n" );
    printReleaseInfo( "iexit" );
}
Exemplo n.º 9
0
Arquivo: idbug.cpp Projeto: bpow/irods
void  printIdbugHelp( char *cmd ) {
    printf( "idbug: icommand for rule debugging \n" );
    printf( "usage: %s [-h][-v n] [-c|C] \n" , cmd );
    printf( "   -h : prints this  help message \n" );
    printf( "   -v : verbose mode 1,2 or 3 \n" );
    printf( "   -c : starts debugging in continue mode for all processes\n" );
    printf( "   -C : same as -c but with steps shown\n" );

    printCommandSummary();
    printReleaseInfo( "idbug" );
}
Exemplo n.º 10
0
void
usage() {
    char *msgs[] = {
        "Usage : iphybun [-hK] [-D dataType] [-S srcResource] [-R resource] [-s maxSize_in_GB] [-N numOfSubFiles] collection ... ",
        "iphybun allows system admin to physically bundle files in a collection into",
        "a number of tar files to make it more efficient to store these files on tape.",
        "The tar files are placed into the /myZone/bundle/.... collection with file",
        "names - collection.aRandomNumber. A new tar file will be created whenever",
        "the number of subfiles exceeds 5120 (default value or the value given by",
        "the -N option) or the total size of the subfiles exceeds 4 GBytes (default value or the value given by",
        "the -s option).",
        "A replica is registered for each bundled sub-files with",
        "a fictitious resource - 'bundleResc' and a physical file path pointing to",
        "the logical path of the tar bundle file. Whenever this copy of the subfile",
        "is accessed, the tar file is untarred and staged automatically to the ",
        "'cache' resource. Each extracted file is registered as a replica of its",
        "corresponding subfiles.",
        "",
        "A tar bundle file can be replicated or trimmed independently from its",
        "corresponding subfiles. But it cannot be renamed or moved to trash.",
        "It can be removed with the 'irm -f' command. But this  will trigger the ",
        "staging of the subfiles before the tar file is removed.",
        "The -R flag specifies the resource of the bundle tar file. This input is",
        "mandatory. The input resource must be a 'cache' type resource.",
        "",
        "Options are:",
        " -D  dataType - the target struct file dataType. Valid dataTypes are -",
        "     t|tar|'tar file' for tar file, g|gzip|gzipTar for gziped tar file,",
        "     b|bzip2|bzip2Tar for bzip2 file, and z|zip|zipFile for archive using",
        "     'zip'.  If -D is not specified, the default is a tar file type",
        " -N  numOfSubFiles - maximum number of subfiles that are contained in the",
        "     tar file. If this option is not given, the default value will be 5120.",
        "     Note that if this number is too high, it can cause some significant",
        "     overhead for operations like retrieving a single file within a tar file",
        "     (stage, untar and register in iRODS lots of files).",
        " -R  resource - The resource where the bundle file is located",
        " -S  srcResource - Only files in this resource will be bundled",
        " -K  compute and register checksum value for the bundled subfiles and the",
        "     bundle file.",
        " -s  maxSize_in_GB - maximum size for the tar bundle file. This is given ",
        "     in GB. If the option is not given, the default value will be 4 GBs.",
        " -h  this help",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "iphybun" );
}
Exemplo n.º 11
0
Arquivo: icd.cpp Projeto: bpow/irods
void usage( char *prog ) {
    printf( "Changes iRODS the current working directory (collection)\n" );
    printf( "Usage: %s [-vh] [directory]\n", prog );
    printf( "If no directory is entered, the cwd is set back to your home\n" );
    printf( "directory as defined in your .rodsEnv file.\n" );
    printf( "Like the unix 'cd', '..' will move up one level and \n" );
    printf( "'/name' starts at the root.\n" );
    printf( " -v  verbose\n" );
    printf( " -V  very verbose\n" );
    printf( " -h  this help\n" );
    printReleaseInfo( "icd" );
}
Exemplo n.º 12
0
void usage() {
    printf( "Usage: iqdel [-vVh] ruleId [...]\n" );
    printf( "Usage: iqdel [-a] [-u user]\n" );
    printf( "\n" );
    printf( " iqdel removes delayed rules from the queue.\n" );
    printf( " multiple ruleIds may be included on the command line.\n" );
    printf( " The -a option specifies the removal of all delayed rules\n" );
    printf( " The -u option specifies the removal of all delayed rules of the given user\n" );
    printf( " The -a and -u options cannot be used together\n" );
    printf( "\n" );
    printf( "Also see iqstat and iqmod.\n" );
    printReleaseInfo( "iqdel" );
}
Exemplo n.º 13
0
void usage (char *prog)
{
  printf("Creates a file containing your iRODS password in a scrambled form,\n");
  printf("to be used automatically by the icommands.\n");
  printf("Usage: %s [-ehvVl] [--ttl TimeToLive]\n", prog);
  printf(" -e  echo the password as you enter it (normally there is no echo)\n");
  printf(" -l  list the iRODS environment variables (only)\n");
  printf(" -v  verbose\n");
  printf(" -V  Very verbose\n");
  printf("--ttl ttl  set the password Time To Live (specified in hours)\n");
  printf("           Run 'iinit -h --ttl' for more\n");
  printf(" -h  this help\n");
  printReleaseInfo("iinit");
}
Exemplo n.º 14
0
/*
Print the main usage/help information.
 */
void usage() {
    char *msgs[] = {
        "Usage: iuserinfo [-vVh] [user]",
        " ",
        "Show information about your iRODS user account or the entered user",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "iuserinfo" );
}
Exemplo n.º 15
0
void
usage() {
    const char * const msgs[] = {
        "Usage : ihelp [-ah] [icommand]",
        "Display i-commands synopsis or a particular i-command help text",
        "Options are:",
        " -h  this help",
        " -a  print the help text for all the i-commands",
        " ",
        "Run with no options to display a synopsis of the i-commands"
    };

    for ( unsigned int i = 0; i < sizeof( msgs ) / sizeof( msgs[0] ); ++i ) {
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "ihelp" );
}
Exemplo n.º 16
0
void usage() {
    printf( "Usage: iqmod [-vVh] ruleId FIELD_NAME fieldValue\n" );
    printf( "\n" );
    printf( "iqmod modifies values in existing delayed rules.\n" );
    printf( "\n" );
    printf( "FIELD_NAME can be: %s %s %s %s\n",
            RULE_NAME_KW, RULE_REI_FILE_PATH_KW, RULE_USER_NAME_KW,
            RULE_EXE_ADDRESS_KW );
    printf( "%s %s %s %s\n",
            RULE_EXE_TIME_KW, RULE_EXE_FREQUENCY_KW, RULE_PRIORITY_KW,
            RULE_ESTIMATE_EXE_TIME_KW );
    printf( "%s %s or %s \n",
            RULE_NOTIFICATION_ADDR_KW, RULE_LAST_EXE_TIME_KW, RULE_EXE_STATUS_KW );
    printf( "\n" );
    printf( "Also see iqstat and iqdel.\n" );
    printReleaseInfo( "iqmod" );
}
Exemplo n.º 17
0
Arquivo: ixmsg.c Projeto: UPPMAX/irods
int 
printIxmsgHelp(char *cmd) {

  printf("usage: %s s [-t ticketNum] [-n startingMessageNumber] [-r numOfReceivers] [-H header] [-M message] \n" , cmd);
  printf("usage: %s r [-n NumberOfMessages] [-t tickefStreamtNum] [-s startingSequenceNumber] [-c conditionString]\n" , cmd);
  printf("usage: %s t \n" , cmd);
  printf("usage: %s d -t ticketNum \n" , cmd);
  printf("usage: %s c -t ticketNum \n" , cmd);
  printf("usage: %s c -t ticketNum -s sequenceNum \n" , cmd);
  printf("    s: send messages. If no ticketNum is given, 1 is used \n");
  printf("    r: receive messages. If no ticketNum is given, 1 is used \n");
  printf("    t: create new message stream and get a new ticketNum \n");
  printf("    d: drop message Stream \n");
  printf("    c: clear message Stream \n");
  printf("    e: erase a message \n");
  printReleaseInfo("ixmsg"); 
  exit(1);
}
Exemplo n.º 18
0
void 
usage ()
{
   char *msgs[]={
   "Usage : irm [-rUfvVh] [-n replNum] [--empty] dataObj|collection ... ",
"Remove one or more data-object or collection from iRODS space. By default, ",
"the data-objects are moved to the trash collection (/myZone/trash) unless",
"either the -f option or the -n option is used.",
" ",
"The -U option allows the unregistering of the data object or collection",
"without deleting the physical file. Normally, a normal user cannot",
"unregister a data object if the physical file is located in a resource",
"vault. The acNoChkFilePathPerm rule allows this check to be bypassed.", 
" ",
"There is no -R option (remove replica from a named resource) at this time.",
"Please use itrim (with the -S option) instead.",
" ",
"The irmtrash command should be used to delete data-objects in the trash",
"collection.",   
" ",
"Options are:",
" -f  force - Immediate removal of data-objects without putting them in trash .",
" -n  replNum  - the replica to remove; if not specified remove all replicas.",
"     This option is applicable only to the removal of data object and",
"     will be ignored for collection removal.",
" -r  recursive - remove the whole subtree; the collection, all data-objects",
"     in the collection, and any subcollections and sub-data-objects in the",
"     collection.",
" -U  unregister the file or collection",
" -v  verbose",
" -V  Very verbose",
" --empty  If the file to be removed is a bundle file (generated with iphybun)",
"     remove it only if all the subfiles of the bundle have been removed.",
" -h  this help",
""};
   int i;
   for (i=0;;i++) {
      if (strlen(msgs[i])==0) break;
      printf("%s\n",msgs[i]);
   }
   printReleaseInfo("irm");
}
Exemplo n.º 19
0
void
usage() {
    char *msgs[] = {
        "Usage : irmtrash [-hMrvV] [--orphan] [-u user] [-z zoneName] [--age age_in_minutes] [dataObj|collection ...] ",
        "Remove one or more data-object or collection from a RODS trash bin.",
        "If the input dataObj|collection is not specified, the entire trash bin",
        "of the user (/$myZone/trash/$myUserName) will be removed.",
        " ",
        "The dataObj|collection can be used to specify the paths of dataObj|collection",
        "in the trash bin to be deleted. If the path is relative (does not start",
        "with '/'), the path assumed to be relative to be the user's trash home path",
        "e.g., /myZone/trash/home/myUserName.",
        " ",
        "An admin user can use the -M option to delete other users' trash bin.",
        "The -u option can be used by an admin user to delete the trash bin of",
        "a specific user. If the -u option is not used, the trash bins of all",
        "users will be deleted.",
        " ",
        "Options are:",
        " -r  recursive - remove the whole subtree; the collection, all data-objects",
        "     in the collection, and any subcollections and sub-data-objects in the",
        "     collection.",
        " -M  admin mode",
        " --orphan  remove the orphan files in the /myZone/trash/orphan collection",
        "     It must be used with the -M option.",
        " -u  user - Used with the -M option allowing an admin user to delete a",
        "     specific user's trash bin.",
        " -v  verbose",
        " -V  Very verbose",
        " -z  zoneName - the zone where the rm trash will be carried out",
        " -h  this help",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "irmtrash" );
}
Exemplo n.º 20
0
void
usage () {
   char *msgs[]={
"Usage : iscan [-rh] srcPhysicalFile|srcPhysicalDirectory|srcDataObj|srcCollection",
"If the input is a local data file or a local directory, it checks if the content is registered in irods.",
"It allows to detect orphan files, srcPhysicalFile or srcPhysicalDirectory must be a full path name.",
"If the input is an iRODS file or an iRODS collection, it checks if the physical files corresponding ",
" to the iRODS object does exist on the data servers.",
"For srcDataObj and srcCollection (iRODS objects), it must be prepended with 'i:'.",
"Options are:",
" -r  recursive - scan local subdirectories or subcollections",
" -h  this help",
""};
   int i;
   for (i=0;;i++) {
      if (strlen(msgs[i])==0) break;
      printf("%s\n",msgs[i]);
   }
   printReleaseInfo("iscan");
}
Exemplo n.º 21
0
void
usage() {
    char *msgs[] = {
        "Usage: imkdir [-phvV] collection ...",
        "Create one or more new collections",
        "Options are:",
        " -p  make parent directories as needed",
        " -v  verbose",
        " -V  Very verbose",
        " -h  this help",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "imkdir" );
}
Exemplo n.º 22
0
/*
Print the main usage/help information.
 */
void usageMain() {
    char *msgs[] = {
        "Usage: iticket [-h] [command]",
        " -h This help",
        "Commands are:",
        " create read/write Object-Name [string] (create a new ticket)",
        " mod Ticket_string-or-id uses/expire string-or-none  (modify restrictions)",
        " mod Ticket_string-or-id write-bytes-or-file number-or-0 (modify restrictions)",
        " mod Ticket_string-or-id add/remove host/user/group string (modify restrictions)",
        " ls [Ticket_string-or-id] (non-admins will see just your own)",
        " ls-all (list all your tickets, even with missing targets)",
        " delete ticket_string-or-id",
        " quit",
        " ",
        "Tickets are another way to provide access to iRODS data-objects (files) or",
        "collections (directories or folders).  The 'iticket' command allows you",
        "to create, modify, list, and delete tickets.  When you create a ticket",
        "it's 16 character string it given to you which you can share with others.",
        "This is less secure than normal iRODS login-based access control, but",
        "is useful in some situations.  See the 'ticket-based access' page on",
        "irods.org for more information.",
        " ",
        "A blank execute line invokes the interactive mode, where iticket",
        "prompts and executes commands until 'quit' or 'q' is entered.",
        "Like other unix utilities, a series of commands can be piped into it:",
        "'cat file1 | iticket' (maintaining one connection for all commands).",
        " ",
        "Use 'help command' for more help on a specific command.",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "iticket" );
}
Exemplo n.º 23
0
Arquivo: itrim.cpp Projeto: bpow/irods
void
usage() {

    char *msgs[] = {
        "Usage : itrim [-hMrvV] [--age age_in_minutes] [--dryrun] [-n replNum]|[-S srcResource] [-N numCopies] dataObj|collection ... ",
        " ",
        "Reduce the number of replicas of a dataObject in iRODS by deleting some replicas.",
        "Nothing will be done if this is less than or equal to numCopies. The -n and",
        "the -S options are used to specified which copies to delete. If neither of",
        "these options are used, the replicas will be trimmed until there are",
        "numCopies left. The old copies will be trimmed first, then the 'cache'",
        "class copies.",
        " ",
        "Options are:",
        " -M  admin - admin user uses this option to trim other users files",
        " -n  replNum  - the replica number of the replica to be deleted",
        " -N  numCopies - minimum number of most current copies to keep. The default",
        "     value is 2.",
        " -r  recursive - trim the whole subtree",
        " -S  srcResource - specifies the resource of the replica to be deleted.",
        "     If specified, only copies stored in this resource will be candidate",
        "     for the deletion.",
        " -v  verbose",
        " -V  Very verbose",
        "--age age_in_minutes - The minimum age of the copy in minutes for trimming.",
        "     i.e., a copy will not be trimmed if its age is less.",
        "--dryrun - Do a dry run. No copy will atually be trimmed.",
        " -h  this help",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "itrim" );
}
Exemplo n.º 24
0
/*
Print the main usage/help information.
 */
void usage()
{
   char *msgs[]={
"ilsresc lists iRODS resources and resource-groups",
"Usage: ilsresc [-lvVhA] [Name]", 
"If Name is present, list only that resource or resource-group,",
"otherwise list them all ",
"Options are:", 
" -l Long format - list details",
" -v verbose",
" -V Very verbose",
" -z Zonename  list resources of specified Zone",
" -A Rescname  list the access permisssions (applies to Database Resources only)",
" -h This help",
""};
   int i;
   for (i=0;;i++) {
      if (strlen(msgs[i])==0) break;
      printf("%s\n",msgs[i]);
   }
   printReleaseInfo("ilsresc");
}
Exemplo n.º 25
0
void usageMain()
{
   char *Msgs[]={
"Usage: igroupadmin [-hvV] [command]",
" ",
"This is for users of type 'groupadmin' which are allowed to perform",
"certain administrative functions.  It can also be used by regular",
"users to list groups ('lg') and by the admin for all operations.",
" ",
"A blank execute line invokes the interactive mode, where it",
"prompts and executes commands until 'quit' or 'q' is entered.",
"Single or double quotes can be used to enter items with blanks.",
"Commands are:",
" lg [name] (list group info (user member list))",
" mkuser Name Password (make a user and set the initial password)",
" atg groupName userName[#Zone] (add to group - add a user to a group)",
" rfg groupName userName[#Zone] (remove from group - remove a user from a group)",
" mkgroup groupName[#Zone] (make a new group)",
" help (or h) [command] (this help, or more details on a command)",
""};
   printMsgs(Msgs);
   printReleaseInfo("igroupadmin");
}
Exemplo n.º 26
0
void
usage() {
    char *msgs[] = {
        "Usage: iquest [-hz] [--no-page] [ [hint] format]  selectConditionString ",
        "Usage: iquest --sql 'pre-defined SQL string' [format] [arguments] ",
        "Usage: iquest attrs",
        "Options are:",
        " -h  this help",
        " -z Zonename  the zone to query (default or invalid uses the local zone)",
        " --no-page    do not prompt asking whether to continue or not",
        "              (by default, prompt after a large number of results (500)",
        "format is C format restricted to character strings.",
        "selectConditionString is of the form: SELECT <attribute> [, <attribute>]* [WHERE <condition> [ AND <condition>]*]",
        "attribute can be found using 'iquest attrs' command",
        "condition is of the form: <attribute> <rel-op> <value>",
        "rel-op is a relational operator: eg. =, <>, >,<, like, not like, between, etc.,",
        "value is either a constant or a wild-carded expression.",
        "One can also use a few aggregation operators such as sum,count,min,max and avg,",
        "or order and order_desc (descending) to specify an order (if needed).",
        "Use % and _ as wild-cards, and use \\ to escape them.",
        "If 'no-distinct' appears before the selectConditionString, the normal",
        "distinct option on the SQL will bypassed (this is useful in rare cases).",
        "If uppercase (or upper) appears before the selectConditionString, the",
        "database value in the 'where' condition will be made upper case so one can do",
        "case-insensitive tests (using upper-case literals).",
        " ",
        "The --sql option executes a pre-defined SQL query.  The specified query must",
        "match one defined by the admin (see 'iadmin h asq' (add specific query)).",
        "A few of these may be defined at your site.  A special alias 'ls' ('--sql ls')",
        "is normally defined to display these. You can specify these via the full",
        "SQL or the alias, if defined.  Generally, it is better to use the",
        "general-query (non --sql forms herein) since that generates the proper SQL",
        "(knows how to link the ICAT tables) and handles access control and other",
        "aspects of security.  If the SQL includes arguments, you enter them following",
        "the SQL. As without --sql, you can enter a printf format statement to use in",
        "formatting the results (except when using aliases).",
        " ",
        "Examples:",
        " iquest \"SELECT DATA_NAME, DATA_CHECKSUM WHERE DATA_RESC_NAME like 'demo%'\"",
        " iquest \"For %-12.12s size is %s\" \"SELECT DATA_NAME ,  DATA_SIZE  WHERE COLL_NAME = '/tempZone/home/rods'\"",
        " iquest \"SELECT COLL_NAME WHERE COLL_NAME like '/tempZone/home/%'\"",
        " iquest \"User %-6.6s has %-5.5s access to file %s\" \"SELECT USER_NAME,  DATA_ACCESS_NAME, DATA_NAME WHERE COLL_NAME = '/tempZone/home/rods'\"",
        " iquest \" %-5.5s access has been given to user %-6.6s for the file %s\" \"SELECT DATA_ACCESS_NAME, USER_NAME, DATA_NAME WHERE COLL_NAME = '/tempZone/home/rods'\"",
        " iquest no-distinct \"select META_DATA_ATTR_NAME\"",
        " iquest uppercase \"select COLL_NAME, DATA_NAME WHERE DATA_NAME like 'F1'\"",

        " iquest \"SELECT RESC_NAME, RESC_LOC, RESC_VAULT_PATH, DATA_PATH WHERE DATA_NAME = 't2' AND COLL_NAME = '/tempZone/home/rods'\"",
        " iquest \"User %-9.9s uses %14.14s bytes in %8.8s files in '%s'\" \"SELECT USER_NAME, sum(DATA_SIZE),count(DATA_NAME),RESC_NAME\"",
        " iquest \"select sum(DATA_SIZE) where COLL_NAME = '/tempZone/home/rods'\"",
        " iquest \"select sum(DATA_SIZE) where COLL_NAME like '/tempZone/home/rods%'\"",
        " iquest \"select sum(DATA_SIZE), RESC_NAME where COLL_NAME like '/tempZone/home/rods%'\"",
        " iquest \"select order_desc(DATA_ID) where COLL_NAME like '/tempZone/home/rods%'\"",
        " iquest \"select count(DATA_ID) where COLL_NAME like '/tempZone/home/rods%'\"",
        " iquest \"select RESC_NAME where RESC_CLASS_NAME IN ('bundle','archive')\"",
        " iquest \"select DATA_NAME,DATA_SIZE where DATA_SIZE BETWEEN '100000' '100200'\"",
        " iquest \"%s/%s %s\" \"SELECT COLL_NAME, DATA_NAME, DATA_CREATE_TIME WHERE COLL_NAME like '/tempZone/home/rods%' AND DATA_CREATE_TIME like '01508165%'\"",
        " iquest \"%s/%s\" \"select COLL_NAME, DATA_NAME where DATA_RESC_NAME = 'replResc' and DATA_REPL_STATUS = '0'\"",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "iquest" );
}
Exemplo n.º 27
0
void
printMainHelp() {
    const char * const msgs[] = {
        "The following is a list of the icommands and a brief description of",
        "what each does:",
        " ",
        "iadmin   - perform irods administrator operations (irods admins only).",
        "ibun     - upload/download structured (tar) files.",
        "icd      - change the current working directory (collection).",
        "ichksum  - checksum one or more data-objects or collections.",
        "ichmod   - change access permissions to collections or data-objects.",
        "icp      - copy a data-object (file) or collection (directory) to another.",
        "idbug    - interactively debug rules.",
        "ienv     - display current irods environment.",
        "ierror   - convert an irods error code to text.",
        "iexecmd  - remotely execute special commands.",
        "iexit    - exit an irods session (un-iinit).",
        "ifsck    - check if local files/directories are consistent with the associated objects/collections in iRODS.",
        "iget     - get a file from iRODS.",
        "igetwild - get one or more files from iRODS using wildcard characters.",
        "igroupadmin - perform group-admin functions:mkuser, add/remove from group, etc.",
        "ihelp    - display a synopsis list of the i-commands.",
        "iinit    - initialize a session, so you don't need to retype your password.",
        "ilocate  - search for data-object(s) OR collections (via a script).",
        "ils      - list collections (directories) and data-objects (files).",
        "ilsresc  - list iRODS resources.",
        "imcoll   - manage mounted collections and associated cache.",
        "imeta    - add/remove/copy/list/query user-defined metadata.",
        "imiscsvrinfo - retrieve basic server information.",
        "imkdir   - make an irods directory (collection).",
        "imv      - move/rename an irods data-object (file) or collection (directory).",
        /*
                "inc      - perform NetCDF operations on data objects (available if configured).",
                "incarch  - archive open ended NETCDF time series data. (if configured).",
                "incattr  - perform NetCDF attribute operations (if configured).",
        */
        "ipasswd  - change your irods password.",
        "iphybun  - physically bundle files (admin only).",
        "iphymv   - physically move a data-object to another storage resource.",
        "ips      - display iRODS agent (server) connection information.",
        "iput     - put (store) a file into iRODS.",
        "ipwd     - print the current working directory (collection) name.",
        "iqdel    - remove a delayed rule (owned by you) from the queue.",
        "iqmod    - modify certain values in existing delayed rules (owned by you).",
        "iqstat   - show the queue status of delayed rules.",
        "iquest   - issue a question (query on system/user-defined metadata).",
        "iquota   - show information on iRODS quotas (if any).",
        "ireg     - register a file or directory/files/subdirectories into iRODS.",
        "irepl    - replicate a file in iRODS to another storage resource.",
        "irm      - remove one or more data-objects or collections.",
        "irmtrash - remove data-objects from the trash bin.",
        "irsync   - synchronize collections between a local/irods or irods/irods.",
        "irule    - submit a rule to be executed by the iRODS server.",
        "iscan    - check if local file or directory is registered in irods.",
        "isysmeta - show or modify system metadata.",
        "iticket  - create, delete, modify & list tickets (alternative access strings).",
        "itrim    - trim down the number of replicas of data-objects.",
        "iuserinfo- show information about your iRODS user account.",
        "ixmsg    - send/receive iRODS xMessage System messages.",
        " ",
        "For basic operations, try: iinit, ils, iput, iget, imkdir, icd, ipwd,",
        "and iexit.",
        " ",
        "For more information, run the icommand with '-h' or run ",
        "'ihelp icommand'."
    };
    for ( unsigned int i = 0; i < sizeof( msgs ) / sizeof( msgs[0] ); ++i ) {
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "ihelp" );
}
Exemplo n.º 28
0
void 
usage ()
{
   char *msgs[]={
"Usage : ibun -x [-hb] [-R resource] structFilePath",
"               irodsCollection",
"Usage : ibun -c [-hf] [-R resource] [-D dataType] structFilePath",
"               irodsCollection",
"Usage : ibun --add [-h] structFilePath irodsCollection",

" ",
"Bundle file operations. This command allows structured files such as ",
"tar files to be uploaded and downloaded to/from iRODS.",
" ",
"A tar file containing many small files can be created with normal unix",
"tar command on the client and then uploaded to the iRODS server as a",
"normal iRODS file. The 'ibun -x' command can then be used to extract/untar",
"the uploaded tar file. The extracted subfiles and subdirectories will",
"appeared as normal iRODS files and sub-collections. The 'ibun -c' command",
"can be used to tar/bundle an iRODS collection into a tar file.",
" ",
"For example, to upload a directory mydir to iRODS:",
" ",
"    tar -chlf mydir.tar -C /x/y/z/mydir .",
"    iput -Dtar mydir.tar .",
"    ibun -x mydir.tar mydir", 
" ",
"Note the use of -C option with the tar command which will tar the",
"content of mydir but without including the directory mydir in the paths.",
"The 'ibun -x' command extracts the tar file into the mydir collection.",
"The target mydir collection does not have to exist nor be empty.",
"If a subfile already exists in the target collection, the ingestion",
"of this subfile will fail (unless the -f flag is set) but the process",
"will continue.",
" ",
"It is generally a good practice to tag the tar file using the -Dtar flag",
"when uploading the file using iput. But if the tag is not made,",
"the server assumes it is a tar dataType. The dataType tag can be added",
"afterward with the isysmeta command. For example:",
"    isysmeta mod /tempZone/home/rods/mydir.tar datatype 'tar file'",
" ",
"The following command bundles the iRods collection mydir into a tar file:",
" ",
"    ibun -cDtar mydir1.tar mydir", 
" ",
"If a copy of a file to be bundled does not exist on the target resource,",
"a replica will automatically be made on the target resource.",
"Again, if the -D flag is not use, the bundling will be done using tar.",
" ",
"The -b option when used with the -x option, specifies bulk registration",
"which does up to 50 rgistrations at a time to reduce overhead.",
" ",
"Options are:",
" -b  bulk registration when used with -x to reduce overhead",
" -R  resource - specifies the resource to store to. This is optional",
"     in your environment",
" -D  dataType - the struct file data type. Valid only for -c option for",
"     specifying the target data type. Valid dataTypes are - t|tar|'tar file'",
"     for tar file. g|gzip|gzipTar for gziped tar file, b|bzip2|bzip2Tar for",
"     bzip2 file, and z|zip|zipFile for archive using 'zip'.  If -D is not",
"     specified, the default is a tar file type",
" -x  extract the structFile and register the extracted files and directories",
"     under the input irodsCollection", 
" -c  bundle the files and sub-collection underneath the input irodsCollection",
"     and store it in the structFilePath",  
" -f  force overwrite the struct file (-c) or the subfiles (-x).", 
" --add  add or append to existing tar file. The tar file must not be compressed",
" -h  this help",
""};
   int i;
   for (i=0;;i++) {
      if (strlen(msgs[i])==0) break;
      printf("%s\n",msgs[i]);
   }
   printReleaseInfo("ibun");
}
Exemplo n.º 29
0
void
printMainHelp() {
    const char * const msgs[] = {
        "The iCommands and a brief description of each:",
        " ",
        "iadmin       - perform iRODS administrator operations (iRODS admins only).",
        "ibun         - upload/download structured (tar) files.",
        "icd          - change the current working directory (Collection).",
        "ichksum      - checksum one or more Data Objects or Collections.",
        "ichmod       - change access permissions to Collections or Data Objects.",
        "icp          - copy a data-object (file) or Collection (directory) to another.",
        "idbug        - interactively debug rules.",
        "ienv         - display current iRODS environment.",
        "ierror       - convert an iRODS error code to text.",
        "iexecmd      - remotely execute special commands.",
        "iexit        - exit an iRODS session (opposite of iinit).",
        "ifsck        - check if local files/directories are consistent with the associated Data Objects/Collections in iRODS.",
        "iget         - get a file from iRODS.",
        "igroupadmin  - perform group-admin functions: mkuser, add/remove from group, etc.",
        "ihelp        - display a synopsis list of the iCommands.",
        "iinit        - initialize a session, so you don't need to retype your password.",
        "ils          - list Collections (directories) and Data Objects (files).",
        "ilsresc      - list iRODS resources.",
        "imcoll       - manage mounted collections and associated cache.",
        "imeta        - add/remove/copy/list/query user-defined metadata.",
        "imiscsvrinfo - retrieve basic server information.",
        "imkdir       - make an iRODS directory (Collection).",
        "imv          - move/rename an iRODS Data Object (file) or Collection (directory).",
        "ipasswd      - change your iRODS password.",
        "iphybun      - physically bundle files (admin only).",
        "iphymv       - physically move a Data Object to another storage Resource.",
        "ips          - display iRODS agent (server) connection information.",
        "iput         - put (store) a file into iRODS.",
        "ipwd         - print the current working directory (Collection) name.",
        "iqdel        - remove a delayed rule (owned by you) from the queue.",
        "iqmod        - modify certain values in existing delayed rules (owned by you).",
        "iqstat       - show the queue status of delayed rules.",
        "iquest       - issue a question (query on system/user-defined metadata).",
        "iquota       - show information on iRODS quotas (if any).",
        "ireg         - register a file or directory/files/subdirectories into iRODS.",
        "irepl        - replicate a file in iRODS to another storage resource.",
        "irm          - remove one or more Data Objects or Collections.",
        "irmtrash     - remove Data Objects from the trash bin.",
        "irsync       - synchronize Collections between a local/iRODS or iRODS/iRODS.",
        "irule        - submit a rule to be executed by the iRODS server.",
        "iscan        - check if local file or directory is registered in iRODS.",
        "isysmeta     - show or modify system metadata.",
        "iticket      - create, delete, modify & list tickets (alternative access strings).",
        "itrim        - trim down the number of replicas of Data Objects.",
        "iuserinfo    - show information about your iRODS user account.",
        "ixmsg        - send/receive iRODS xMessage System messages.",
        "izonereport  - generates a full diagnostic/backup report of your Zone.",
        " ",
        "For more information on a particular iCommand:",
        " '<iCommand> -h'",
        "or",
        " 'ihelp <iCommand>'"
    };
    for ( unsigned int i = 0; i < sizeof( msgs ) / sizeof( msgs[0] ); ++i ) {
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "ihelp" );
}
Exemplo n.º 30
0
void
usage() {
    char *msgs[] = {
        "Usage : irsync [-rahKsvV] [-N numThreads] [-R resource] [--link] [--age age_in_minutes]",
        "          sourceFile|sourceDirectory [....] targetFile|targetDirectory",
        " ",
        "Synchronize the data between a  local  copy  (local file  system)  and",
        "the copy stored in iRODS or between two iRODS copies. The command can be ",
        "in one of  the  three  modes  : synchronization of data from the client's",
        "local file system to iRODS, from iRODS to the local file system, or from",
        "one iRODS path to another iRODS path. The mode is determined by",
        "the way the sourceFile|sourceDirectory and targetFile|targetDirectory are",
        "specified. Files and directories prepended with 'i:' are iRODS files and",
        "collections. Local  files and directories are specified  without any",
        "prependage. For example, the command:",
        " ",
        "     irsync -r foo1 i:foo2",
        " ",
        "     synchronizes recursively the data from the  local  directory",
        "     foo1 to the iRODS collection foo2 and the command:",
        " ",
        "     irsync -r i:foo1 foo2",
        " ",
        "     synchronizes recursively the data from the iRODS collection",
        "     foo1 to the local directory foo2.",

        "     irsync -r i:foo1 i:foo2",
        " ",
        "synchronizes recursively the data from  the  iRODS  collection foo1 to another",
        "iRODS collection foo2.",
        " ",
        "The command compares the checksum values and file sizes of the source",
        "and target files to determine whether synchronization is needed. Therefore,",
        "the command will run faster if the checksum value for the specific iRODS file,",
        "no matter whether it is a source or target, already exists and is registered",
        "with  iCAT. This can be achieved by using the -k or -K options of the iput",
        "command at the time of  ingestion, or by using the ichksum command after the",
        "data have already been ingested into iRODS.",

        "If the -s option is used, only the file size (instead of the the size and",
        "checksum value) is used for determining whether synchronization is needed.",
        "This  mode  is  gives  a  faster operation but the result is less accurate.",
        " ",
        "The command accepts  multiple  sourceFiles|sourceDirectories and a single",
        "targetFile|targetDirectory. It pretty much follows the syntax of the UNIX",
        "cp command with one exception- irsync of a single source  directory to a ",
        "single target directory. In UNIX, the command:",
        " ",
        "     cp -r foo1 foo2",
        " ",
        "has a different meaning depending on whether the target directory foo2 ",
        "exists. If the target directory exists,the content of source directory foo1",
        "is copied to the target directory foo2/foo1. But if the target directory",
        "does not exist, the content is copied to the target directory foo2.",
        " ",
        "With the irsync command,",
        " ",
        "     irsync -r foo1 i:foo2",
        " ",
        "always means the  synchronization  of  the local directory foo1 to collection",
        "foo2, no matter whether foo2 exists or not.",
        " ",
        " -K  verify checksum - calculate and verify the checksum on the data",
        " -N  numThreads - the number of thread to use for the transfer. A value of",
        "       0 means no threading. By default (-N option not used) the server",
        "       decides the number of threads to use.",
        " -R  resource - specifies the target resource. This can also be",
        "specified in your environment or via a rule set up by the administrator.",
        " -r  recursive - store the whole subdirectory",
        " -v  verbose",
        " -V  Very verbose",
        " -h  this help",
        " -l  lists all the source files that needs to be synchronized (including their filesize in bytes) wrt to the target",
        "without actually doing the synchronization.",
        " --link - ignore symlink. Valid only for rsync from local host to iRODS.",
        " -a   synchronize to all replica if the target is a  iRODS file/collection.",
        " -s   use the size instead of the checksum value for determining",
        "      synchronization.",
        " --age age_in_minutes - The maximum age of the source copy in minutes for sync.",
        "      i.e., age larger than age_in_minutes will not be synced.",
        " ",
        "Also see 'irepl' for the replication and synchronization of physical",
        "copies (replica).",
        ""
    };
    int i;
    for ( i = 0;; i++ ) {
        if ( strlen( msgs[i] ) == 0 ) {
            break;
        }
        printf( "%s\n", msgs[i] );
    }
    printReleaseInfo( "irsync" );
}