Anda di halaman 1dari 306

TeamSite ®

Command-Line Tools
Release 6.7.1
Service Pack 1
UNIX
®
© 1999-2007 Interwoven, Inc. All rights reserved.

No part of this publication (hardcopy or electronic form) may be reproduced or transmitted, in any form
or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written consent of Interwoven. Information in this manual is furnished under license by Interwoven, Inc.
and may only be used in accordance with the terms of the license agreement. If this software or
documentation directs you to copy materials, you must first have permission from the copyright owner
of the materials to avoid violating the law which could result in damages or other remedies.

Interwoven, ConfirmSite, ContentServices, ControlHub, DataDeploy, DeskSite, FileSite, iManage,


LiveSite, MediaBin, MetaCode, MetaTagger, OffSite, OpenDeploy, Primera, Scrittura, TeamPortal,
TeamSite, VisualAnnotate, WorkDocs, WorkPortal, WorkRoute, WorkSite, WorkTeam, the respective
taglines, logos and service marks are trademarks of Interwoven, Inc., which may be registered in certain
jurisdictions. All other trademarks are owned by their respective owners. Some or all of the information
contained herein may be protected by patent numbers: US # 6,505,212, GBRI # 1053523, US #
6,480,944, US# 5,845,270, US #5,430,812, US #5,754,704, US #5,347,600, AUS #735365, AU
7830068, GB #GB2333619, US #5,845,067, US #6,675,299, US #5,835,037, AUS #632333, CAN
#2,062,965, FRAN / GRBI / SPAI / SWED #480941, GERM #69020564.3, KORS 10-0576487, JAPA
#2968582, MX #219522, NZ #516340, SING #109524, SG #89006, SG #89086, SG #74973, SG
#85502 US #5,065,447, US #6,609,184, US #6,141,017, US #5,990,950, US #5,821,999, US
#5,805,217, US #5,838,832, US #5,867,221, US #5,923,376, US #6,434,273, US #5,867,603, US
#4,941,193, US #5,822,721, US #5,923,785, US #5,982,938, US #5,790,131, US #5,721,543, US
#5,982,441, US #5,857,036, US #6,697,532, US #6,792, 454, US #6,928,149, US #7,092,969 or other
patents pending application for Interwoven, Inc.

Interwoven, Inc.
160 East Tasman Drive
San Jose, CA 95134

http://www.interwoven.com
Printed in the United States of America

TeamSite Command-Line Tools


Part 01-007-01-EN
August 2007
Table of Contents
About This Book 11
How This Manual is Organized. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Notation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Chapter 1: Overview of CLTs and Command Triggers 13
CLTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Administration Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Command Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Before Using CLTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Version Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Relative vpaths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Directory Paths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Setting Path Names in Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Executing CLTs Remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Object IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Class IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Specifying Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
CLT Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Chapter 2: Administration Tools 21
System Information Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
System Services Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Content Store Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
iwabort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
iwaccess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
iwaccessmigrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
iwadduser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
iwancestor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
iwchgrp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
iwconfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
iwconfigtsreport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
iwconvertserver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
iwfreeze. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
iwfsck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
iwfsfix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
iwfsshrink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
iwgetelog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
iwgetfilejobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
iwgethome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
iwgetlocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
iwgetlog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
iwgetmount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
iwgetstore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54

TeamSite Command-Line Tools 3


Contents

iwgettrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55
iwgroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
iwidmap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
iwmigrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64
iwprefconv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
iwproxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
iwrecentusers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
iwreset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
iwrmuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70
iwroleadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
iwsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
iwstat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
iwstoreadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
iwtestcfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
iwtock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82
iwuidname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83
iwuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
iwuseradm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87
iwutildreset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
iwutildstat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
iwversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93
Chapter 3: Development Tools 95
General Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
Deployment Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96
Branch Operation Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
Edition Operation Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
Workarea Operation Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
Version Management Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
Workflow and Job Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
Search and Index Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
iwaddtaskfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102
iwaddtaskgroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
iwaddtaskuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
iwattrib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
iwauthen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
iwcallback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
iwcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
iwckrole. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
iwcmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
iwcp. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
iwdecode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
iwdelcp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
iwdeltaskfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
iwdiffapply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
iwdiffdir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
iwencode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127
iwevents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
iwextattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
iwfilestate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133

Interwoven, Inc. 4
Contents

iwgeteventcomments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
iwgeteventfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
iwgettaskbyname. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
iwgetwfobj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139
iwinvokejob. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
iwjobc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
iwjobvariable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142
iwlasted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
iwldapmigrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144
iwldapsearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146
iwldapsync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
iwlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
iwlistlocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
iwlistmod. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
iwlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
iwlockinfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
iwmerge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
iwmkbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
iwmkwa. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
iwmvtaskfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160
iwndxaddbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
iwndxfreezebr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162
iwndxlistbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
iwndxmgrfreeze. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164
iwndxmgrstatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165
iwndxmgrstop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166
iwndxpurgebr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
iwndxrefreshbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168
iwndxrmbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169
iwndxstatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170
iwndxwamodificationsbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
iwnexted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173
iwprop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174
iwprv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
iwpublish. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
iwqueryjobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
iwquerytasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
iwrcsdiff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181
iwrename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
iwretryjobop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184
iwrevert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185
iwrlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186
iwrmbr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
iwrmed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189
iwrmjob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190
iwrmtaskfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
iwrmtaskgroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
iwrmtaskuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193
iwrmwa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194
iwsetjobdescription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195

TeamSite Command-Line Tools 5


Contents

iwsetjobowner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196
iwsettaskattrib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197
iwsettaskcomment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198
iwsettaskdescription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199
iwsettaskfilecomment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .200
iwsettaskownerandarea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201
iwsettasktimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202
iwsrchattrib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
iwsrchgethome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206
iwsrchgetpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207
iwsrchmgrping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209
iwsrchmgrstop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210
iwsrchndxstatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211
iwsrchndxstatuschg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
iwsrchquery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
iwsubmit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217
iwtaketask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218
iwtaskselect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219
iwtaskvariable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
iwundochoice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221
iwunlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222
iwuntaketask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
iwupdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
iwvpath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
Chapter 4: Command Triggers 227
Starting Command Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228
Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230
iwat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232
iwat-env. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233
iwatcreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235
iwatlock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236
iwatmkbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237
iwatmkwa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238
iwatpub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239
iwatrmbr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240
iwatrmed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241
iwatrmwa. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .242
iwatserver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
iwatsub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
iwatunlock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245
iwatupdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
iwlsat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247
iwrmat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
Appendix A: Master List 249
Appendix B: Sample Command Trigger Scripts 257
Email Notification Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
Replication Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262

Interwoven, Inc. 6
Contents

Appendix C: Error Codes 267


Appendix D: Search Query Schemas 277
BaseQueryLanguage.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277
FullTextQueryElements.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
TeamSiteSearch.xsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286
Index 289

TeamSite Command-Line Tools 7


Contents

Interwoven, Inc. 8
List of Tables
Table 1 Notation conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 2 CLT-related environment variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 3 System information tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 4 System services tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 5 Content Store tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 6 General development tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Table 7 Deployment tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Table 8 Branch operation tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Table 9 Edition operation tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Table 10 Workarea operation tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Table 11 Version management tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Table 12 Workflow and job tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Table 13 Search and index tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Table 14 Server attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Table 15 Archive attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Table 16 Branch attribute values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Table 17 Edition attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Table 18 Workarea attribute values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Table 19 Submit event attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Table 20 Update event attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Table 21 Staging area attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Table 22 File and directory attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Table 23 Query expressions and elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Table 24 Command trigger tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Table 25 Command triggers and TeamSite events . . . . . . . . . . . . . . . . . . . . . . . 230
Table 26 CLT alphabetized master list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Table 27 CLT error codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

TeamSite Command-Line Tools 9


List of Tables

Interwoven, Inc. 10
About This Book

TeamSite Command-Line Tools describes each TeamSite command-line tool (CLT) and
®

command trigger, including syntax and usage examples. It is intended primarily for
TeamSite Administrators and Master users, and for Web server administrators and
system administrators. Users of this manual should be familiar with basic UNIX
commands and be able to use an editor such as emacs or vi.

Many of the operations described in this manual require root access to the TeamSite
server. If you do not have root access to the TeamSite server, consult your UNIX system
administrator.

How This Manual is Organized


This manual is organized as follows:
„ Chapter 1, “Overview of CLTs and Command Triggers.” Describes the types of
operations you can perform with CLTs and command triggers, how CLTs and
command triggers are grouped into functional categories, and the general syntax
you must use when entering information (for example, vpaths and object IDs)
common to many CLTs.
„ Chapter 2, “Administration Tools.” Contains man pages for the System Information,
System Services, and Content Store CLTs. All man pages in the chapter are
presented as one group, arranged alphabetically.
„ Chapter 3, “Development Tools.” Contains man pages for CLTs in the following
categories: General Development, Deployment, Branch Operation, Edition
Operation, Workarea Operation, Version Management, Workflow/Job, Templating,
and Search/Index. All man pages in the chapter are presented as one group, arranged
alphabetically.
„ Chapter 4, “Command Triggers.” Contains man pages for command triggers from
the following groups: General Events, File and Directory Events, Branch Events,
Edition Events, and Workarea Events. All man pages in the chapter are presented as
one group, arranged alphabetically.
„ Appendix A, “Master List.” Contains a single alphabetized list of all CLTs and
command triggers described in this manual.
„ Appendix B, “Sample Command Trigger Scripts.” Contains examples of scripts that
can be triggered by command triggers.
„ Appendix C, “Error Codes.” Lists the error codes that can be returned by CLTs.
„ Appendix D, “Search Query Schemas.” Contains the XML schemas used by the
TeamSite search feature.

ContentCenter Professional User’s Guide 11


About This Book

Notation Conventions
This manual uses the following notation conventions:

Table 1 Notation conventions


Convention Definition and Usage
Bold Text that appears in a GUI element (for example, a menu item,
button, or element of a dialog box) and command names are shown
in bold. For example:
Click Edit File in the Button Bar.
Italics Book titles appear in italics.
Terms are italicized the first time they are introduced.
Valuable information may be italicized for emphasis.
Monospace Commands, command-line output, and file names are in
monospace type. For example:
The iwextattr command-line tool allows you to set and look up
extended attributes on a file.
Monospaced Monospaced italics are used for command-line variables.For
italic example:
iwckrole role user
means that you must insert the values of role and user yourself.
Monospaced bold Monospaced bold represents information you enter in response to
system prompts. The character that appears before a line of user
input represents the command prompt, and should not be typed.
The% character that appears before a line of user input represents
the command prompt, and should not be typed. Your system may
not use this command prompt. For example:
% iwextattr -s project=proj1
//IWSERVER/default/main/dev/WORKAREA/andre/products/inde
x.html
Monospaced bold Used to indicate a variable in response to a system prompt.
italics
[] Square brackets surrounding a command-line argument mean that
the argument is optional.
{} Curly braces surrounding a command-line argument mean that the
argument is required.
| Vertical bars separating command-line arguments mean that only
one of the arguments can be used.

Interwoven, Inc. 12
Chapter 1

Overview of CLTs and


Command Triggers

CLTs enable you to use the command line instead of the browser or file system interface
to perform most TeamSite administration and development tasks. For example,
TeamSite provides CLTs for creating and deleting branches and workareas, publishing,
deploying, assigning files, invoking the proxy server, interacting with jobs, and dozens
of other tasks. CLTs are designed for users and administrators who are comfortable
using a command-line interface, and who cannot or prefer not to use the browser or file
system interface.

In addition to CLTs, TeamSite also supports a set of command triggers that let you
configure TeamSite to execute custom scripts whenever certain events occur. For
example, you can use command triggers to execute an email notification script
whenever a file is assigned, or whenever a new branch is created, or when any of several
other supported events occur. The scripts that are triggered can be simple or complex
and typically are created by an administrator for a specific site or installation.

You should use CLTs and command triggers only if you have a good understanding of
TeamSite structure, roles, and concepts. When learning CLTs, it is often helpful to
monitor your activities using the GUI. If you choose to monitor from the GUI, be sure to
refresh your view often. In some cases, it might be helpful to run multiple TeamSite
sessions using the GUI.

The following sections briefly describe the default set of TeamSite CLTs and command
triggers.

CLTs
CLTs are organized into two main categories: administration tools and development
tools.

TeamSite Command-Line Tools 13


Chapter 1: Overview of CLTs and Command Triggers

Administration Tools
Administration tools are divided into the following categories:
„ System Information. Returns system-wide information or information about a
file’s location.They do not provide information about the data in a file (the
development tool CLTs provide that type of information).
„ System Services. Enable you to manipulate files or objects that affect the entire
TeamSite system. Typical tasks include, but are not limited to, editing configuration
files, performing system backups, and starting the proxy server.
„ Content Store. Enables you to perform various tasks on the Content Store,
including checking for and fixing problems, converting to and from a multiple file
system Content Store, and merging metadata files.

See Chapter 2, “Administration Tools,” for details about the CLTs in each category.

Development Tools
Development tools are divided into the following categories:
„ General Tools. Enable you to perform operations on, or retrieve information about,
the data in a specific file or TeamSite object.
„ Deployment. Enable you to you deploy a TeamSite edition to a production server.
„ Branch Operations. Enable you to you create and manipulate TeamSite branches.
„ Edition Operations. Enable you to you create and manipulate TeamSite editions.
„ Workarea Operations. Enable you to create and manipulate TeamSite workareas.
„ Version Management. Return information about file revisions and versions, and let
you manipulate specific versions of files and directories.
„ Workflow/Job. Enable you to control workflow and job elements such as file locks,
assignments to authors, and file approval/rejection.
„ Templating. Enable you to update, insert data into, and otherwise manipulate
template-based files.
„ Search and Index. Enable you to administer the index manager and search server,
control indexing operations on a per-branch basis, and perform various search
operations (including queries).

See Chapter 3, “Development Tools,” for details about the CLTs in each category.

Interwoven, Inc. 14
Chapter 1: Overview of CLTs and Command Triggers

Command Triggers
All command triggers are described in Chapter 4, “Command Triggers”. Two sample
command trigger perl scripts—one that sends email notification and one that replicates
files—are shown in Appendix B, “Sample Command Trigger Scripts”.

Before Using CLTs


Most CLTs require that you specify some type of information when you invoke the
command. For example, you might have to specify an object ID or the location of a
TeamSite object, or provide some other type of information. The following sections
describe how to provide this information.

Additionally, you can enter the name of the CLT followed by -h to obtain “help” on that
CLT. The help provides a brief description of the CLT and lists the flags and options for
that CLT. You can enter the CLT name followed by -v to display version information. If
-h or -v are specified, any other flags or options entered at the same time are ignored.

Version Paths
Most CLTs require that you use a version path (vpath) to specify the location of a
branch, workarea, staging area, edition, file, or directory in TeamSite. Vpaths are used
only for items within TeamSite; all other files (for example, configuration files) must be
specified with a directory path (see “Directory Paths” on page 17). Vpaths have the
following form:

To specify a server:
//servername

For example, the default vpath for the TeamSite server is:
//IWSERVER

To specify a Content Store:


//servername/storename

For example, the default vpath for the TeamSite Content Store is:
//IWSERVER/default

To specify a branch or subbranch:


//servername/archivename{[/branchname]+}
//servername/archivename{[/branchname]+}/subbranchname

For example, the default vpath for the main branch is:
//IWSERVER/default/main

TeamSite Command-Line Tools 15


Chapter 1: Overview of CLTs and Command Triggers

The vpath for a subbranch named dev off of the main branch would be:
//IWSERVER/default/main/dev

To specify an edition:
//servername/archivename{[/branchname]+}/EDITION/editionname

For example, the default vpath for the initial edition on the main branch is:
//IWSERVER/default/main/EDITION/INITIAL

The name of an edition on the subbranch dev would be:


//IWSERVER/default/main/dev/EDITION/ed_0001

To specify a workarea:
//servername/archivename{[/branchname]+}/WORKAREA/workareaname

For example, the vpath for a workarea named eng on the main branch would be:
//IWSERVER/default/main/WORKAREA/eng

The vpath for a workarea named qa on the subbranch dev would be:
//IWSERVER/default/main/dev/WORKAREA/qa

To specify an individual file within a workarea:


//servername/archivename{[/branchname]+}/WORKAREA/workareaname/directory-
pathname/filename

For example, the vpath for a file named logo.gif in the directory /htdocs/gifs in
workarea eng on subbranch dev would be:
//IWSERVER/default/main/dev/WORKAREA/eng/htdocs/gifs/logo.gif

Relative vpaths
Most TeamSite CLTs only require you to specify relative vpaths. For example, instead
of specifying //IWSERVER/default/main you would only need to specify main. In the
following example, if you are already in the default directory, instead of specifying:

//IWSERVER/default/main/dev/WORKAREA/eng/htdocs/gifs/logo.gif

you would only need to specify:


main/dev/WORKAREA/eng/htdocs/gifs/logo.gif

If you are in the htdocs directory of workarea eng on the main branch, you only need to
specify:
gifs/logo.gif

Interwoven, Inc. 16
Chapter 1: Overview of CLTs and Command Triggers

Directory Paths
Some CLTs require you to specify directory paths. These are the full file system mount
directory paths of a file in TeamSite, starting from the server’s root directory. When you
use a CLT, be sure to check whether it requires a directory path or a vpath.

For example, a file whose vpath is:


//IWSERVER/default/main/dev/WORKAREA/eng/htdocs/gifs/logo.gif

would have the directory path of:


/iwmnt/default/main/dev/WORKAREA/eng/htdocs/gifs/logo.gif

Setting Path Names in Environment Variables


TeamSite provides a set of environment variables that automatically expand path names
to CLTs, command triggers, and other files. These variables are especially useful if you
use the command line to call commands that reside on a remote system or that have very
long path names on the local system. The set of variables is as follows:

Table 2 CLT-related environment variables


Variable Description
IWCLT_SERVER Set to the host name of the TeamSite server. Required
when using any of the other three variables shown here.
IWCLT_MOUNT Set to the mount point of TeamSite root (if root is
mounted). IWCLT_SERVER must also be set.
IWCLT_DEFAULTMOUNT Set to the mount point of the default archive (if the
archive is mounted). IWCLT_SERVER must also be set.
IWCLT_DEFAULTMAINMOUNT Set to the mount point of the main TeamSite branch (if
the main branch is mounted on a particular path).
IWCLT_SERVER must also be set.

When using any of these variables, you must set IWCLT_SERVER first. After
IWCLT_SERVER is set, it is typical to set just one of the other three variables, depending
on what is mounted on your system. For example, if the default archive is mounted, you
would set IWCLT_SERVER and IWCLT_DEFAULTMOUNT. You could then execute any
command residing on the defined server and mount point by entering just the command
name on the command line.

NOTE
If you set more than one MOUNT variable, TeamSite extracts information in the following
order: IWCLT_MOUNT, IWCLT_DEFAULTMOUNT, IWCLT_DEFAULTMAINMOUNT.

TeamSite Command-Line Tools 17


Chapter 1: Overview of CLTs and Command Triggers

Executing CLTs Remotely


If the iw-home directory is visible from the client machine you can run the CLTs from
iw-home/bin without copying them into another location. The CLTs look for the
libraries relative to the directory that contains the program file. For example, if the CLTs
are in the default location (iw-home/bin), they require the NLS libraries to be located in
iw-home/lib/locale.

To run CLTs from a remote system complete the following procedure:


1. Set the environmental variables as described in the previous section.
2. Mount iw-home.

Object IDs
Some CLTs require that you specify object IDs (objids). Objids are identifiers for each
object (file, directory, workarea, staging area, edition, tag, and others) in the TeamSite
system. To find the objid for an item, use the iwattrib command (see “iwattrib” on
page 105). CLTs that require an objid also require further information about the objid,
such as what type of object it describes or the area in which it resides.

Object IDs are 24-digit hexadecimal numbers, such as:


0x0000225800000000000006bb

Class IDs
Each type of object has its own class ID. Class IDs are 8-digit hexadecimal numbers,
whose values for each class are as follows.

NOTE
This is only a partial list; additional classes are included with TeamSite.

server 0x00000051

archive 0x00002020

branch 0x00002250

workarea 0x00002100

staging area 0x00002255

submit event 0x00002258

update event 0x0000225A

edition 0x00002010

file or directory 0x00001008

Interwoven, Inc. 18
Chapter 1: Overview of CLTs and Command Triggers

Specifying Comments
CLTs that use comments require them to be specified in one of two ways:
„ As a command option
„ As a required field

For example, a CLT could require a comment to be specified using an option:


iwsubmit [flags] [-c global_comment] [-i info_comment]
{vpath file_comment}+

Specify the comment using the -c option. If you do not use the -c option, the change
comment will be read from stdin. After typing the comment, type Ctrl-D to exit.

NOTE
If you do not specify a comment, you must still type Ctrl-D to exit.

The second way of specifying a comment is as a required field:


iwmkwa //server/archive{[/branch]+} workarea comment base_ed
[ownername [groupname]]

This method requires you to type a comment in the Comment field. If you do not want to
attach a comment, type two single quotes ( '' ) in the Comment field. If the comment
includes spaces, enclose it in a set of single quotes, for example, 'Please edit this
file.'

CLT Location
CLTs reside in the bin subdirectory of the directory returned by the iwgethome
command. Note that not everything contained in this directory is a CLT.

TeamSite Command-Line Tools 19


Chapter 1: Overview of CLTs and Command Triggers

Interwoven, Inc. 20
Chapter 2

Administration Tools

This chapter describes the administration CLTs from the following groups:
„ System Information Tools
„ System Services Tools
„ Content Store Tools

The CLTs are grouped and summarized in the following sections. Each CLT is then
presented in detail, arranged alphabetically.

System Information Tools


System Information CLTs return system-wide information or information about a file’s
location. They do not provide information about the data in a file (the Development Tool
CLTs provide that type of information). CLTs in this category are:

Table 3 System information tools


CLT Description See...
iwancestor Displays the vpath of the common ancestor of the page 34
specified files.
iwgetelog Displays the location of the TeamSite events log page 47
(default: /var/adm/iwevents.log).
iwgethome Displays the location of TeamSite program files page 49
(default: /usr/iw-home).
iwgetlocation Displays the locations of various TeamSite log and page 50
configuration files.
iwgetlog Displays the location of the TeamSite server log page 52
(default: /var/adm/iwserver.log).
iwgetmount Displays the location of the TeamSite mount point page 53
(/iwmnt).
iwgetstore Displays the location of the TeamSite Content Store page 54
(default: /local/iw-store).
iwgettrace Displays the location of TeamSite trace logs page 55
(default: /var/adm/iwtrace.log).

TeamSite Command-Line Tools 21


Chapter 2: Administration Tools

Table 3 System information tools (Continued)


iwrecentusers Displays a list of everyone who has used TeamSite page 68
since the last time the TeamSite server was started,
and a timestamp of each user’s most recent TeamSite
operation.
iwstat Displays current system activity. page 77
iwutildstat Displays active iwutild server operation statistics. page 92
iwversion Displays current TeamSite release information. page 93

System Services Tools


System Services CLTs enable you to manipulate files or objects that affect the entire
TeamSite system. Typical System Services tasks include, but are not limited to, editing
configuration files, performing system backups, setting permissions, and starting the
proxy server. CLTs in this category are:

Table 4 System services tools


CLT Description See...
iwaccess Controls TeamSite user permissions. page 25
iwaccessmigrate Applies user and group permission settings for page 30
configurable roles and delegated administration.
iwabort Stops a current operation. page 24
iwadduser Adds a user to TeamSite role files. page 33
iwchgrp Changes the group of a TeamSite workarea, branch, page 35
or FSE.
iwconfig Reads or writes to the main TeamSite configuration page 36
file.
iwconfigtsreport Sets TeamSite Reporting parameters in the page 37
tsreport.xml file. Parameters include database
type, port, server, user, password, license key, and
other items.
iwfreeze Freezes and unfreezes all system write operations. page 40
iwgroup Administers TeamSite groups (list groups, add and page 56
delete groups or members within a group, modify
group names, and other operations).
iwprefconv Copies existing homepage information from the page 66
iwprofiles directory to the entity database.
iwproxy Invokes a proxy server. page 67
iwreset Rereads TeamSite configuration files. page 69
iwrmuser Removes a user from TeamSite. page 70
iwroleadm Lets you view, create, delete, and otherwise page 71
administer roles.
iwsi Collects system state data. page 71

Interwoven, Inc. 22
Chapter 2: Administration Tools

Table 4 System services tools (Continued)


iwtestcfg Displays the operation that is performed when a page 81
file is submitted.
iwtock Manipulates and displays data about the TeamSite page 82
watchdog daemon.
iwuidname Displays the user login name corresponding to a page 83
specified UID.
iwuser Lets you manipulate TeamSite user information. page 84
iwuseradm Lets you add and remove TeamSite users, change page 87
user attributes, view and set user roles, and manage
some aspects of authentication.
iwutildreset Resets iwutild configuration settings. page 91

Content Store Tools


Content Store CLTs enable you to perform various tasks on the Content Store. CLTs in
this category are:

Table 5 Content Store tools


CLT Description See...
iwconvertserver Supports the conversion GUI by communicating page 39
with remote TeamSite servers. You must run the
iwconvertserver process manually for the GUI to
function properly.
iwfsck Diagnoses Content Store problems. page 42
iwfsfix Fixes problems found by iwfsck. page 44
iwfsshrink Finds and removes duplicate data in the Content page 45
Store.
iwidmap Changes the mapping between the UID and the page 63
token. Can also be used to refresh the mapping
when the same names are used, but the UID has
changed.
iwmigrate Similar to iwconvert except that it accepts release page 64
6.x and later Content Stores as its source. It can be
used to split a Content Store into multiple Content
Stores, or move the contents of a store to another
location without losing the history of submit events
for the editions.
iwstoreadm Enables you to create, activate, and deactivate page 80
new-format Content Stores.

TeamSite Command-Line Tools 23


Chapter 2: Administration Tools

iwabort
Provides a method for terminating a long-running server operation. The command
works on operations including submit, update, create branch, delete
branch/workarea/edition, and freeze. Before issuing iwabort, use iwstat to obtain the
identifier for the operation.
„ Use with submit and update operations. There are occasionally some places in
submit and update where they cannot be terminated by using iwabort. After issuing
iwabort, you may end up with some but not all the files submitted or updated.

„ Use with create and delete operations. The branch will not be created and may or
may not be deleted.

Man Page Group

System Services.

Usage
iwabort operation_id

operation_id The operation_id displayed by iwstat.

Example

Use iwstat to obtain the server status. Then, using the ID shown in the first column,
abort the submit operation.

%iwstat

Status: Server running

ID Thread User Duration Operation


0x24caee4b 0x13 andre 560.006 SubmitFSE 0xef70087ced505b40
0x24caee58 0xf - 0.000 RunFastVacuum
0x24caee57 0x15 chris 0.000 GetArchiveStatus

%iwabort 0x24caee4b

Interwoven, Inc. 24
Chapter 2: Administration Tools

iwaccess
Controls TeamSite user permissions for access to files, directories, areas, branches,
Content Stores, servers, jobs, and tasks. Defines which roles one user can delegate to
another. Defines whether branches and workareas are public or private.

Man Page Group

System Services.

Usage
iwaccess -h [command] | -v

iwaccess add-permission-entry vpath -user user -role role


iwaccess add-permission-entry vpath -group group -role role

iwaccess all-operations-of-user user

iwaccess all-permission-entries

iwaccess all-permission-entries-of-user user [-verbose]

iwaccess all-roles-of-user user

iwaccess check-job-permission jobid -user user -op op

iwaccess check-permission vpath -user user -op op


iwaccess check-permission vpath -taskcontext taskid -user user -op op
iwaccess check-permission vpath -jobcontext jobid -user user -op op
iwaccess check-permission vpath -targetvpath vpath2 -user user -op op

iwaccess check-task-permission taskid -user user -op op

iwaccess clear-permission-entries vpath

iwaccess delegable-roles-of-user vpath -user user

iwaccess export-permission-entries file

iwaccess group vpath

iwaccess import-permission-entries file [-clear]

iwaccess inheritance vpath

iwaccess owner vpath

TeamSite Command-Line Tools 25


Chapter 2: Administration Tools

iwaccess permission-entries vpath [-modinfo] [-inherited]


[-expand-groups]

iwaccess private vpath

iwaccess remove-permission-entry vpath -user user -role role


iwaccess remove-permission-entry vpath -group group -role role

iwaccess roles-of-user vpath -user user

iwaccess set-group vpath user

iwaccess set-inheritance vpath true|false

iwaccess set-owner vpath user

iwaccess set-private vpath true|false

iwaccess set-unix-permission vpath nnnn [-r]


iwaccess set-unix-permission vpath symbolic-mode-list [-r]

iwaccess unix-permission vpath [-n]

-h command Displays iwaccess usage information for


command, or general iwaccess usage information
if command is omitted.
-v Displays version.
add-permission-e vpath Adds a permission entry to the branch, store, or
ntry -user user server specified by vpath, granting user the
-role role permission to perform the operations associated
with role.
-group group Grants permission to a group specified by group.
all-operations- user Displays all roles that user is allowed to perform
of-user on the branch, store, or server.
all-permission- Displays all permission entries on the server, and
entries on branches and stores in the server.
all-permission- user Displays all permissions that user has on the
entries-of-user -verbose branch, store, or server. If specified, verbose
provides extended information.
all-roles-of- user Displays all roles that user has on the branch,
user store, or server.
check-job- jobid Determines whether user is allowed to perform
permission -user user the operation specified by op on the job specified
by jobid. See iwroleadm for a list of valid job
-op op operation names.

Interwoven, Inc. 26
Chapter 2: Administration Tools

check- vpath Determines whether user is allowed to perform


permission -user user the operation specified by op on the object
specified by vpath. Execute iwroleadm -all
-op op operations for a list of valid operation names.
-taskcontext Specifies a task that the operation is attached to.
taskid
-jobcontext Specifies a job that the operation is attached to.
jobid
-targetvpath Specifies an object when the operation (such as
vpath2 RenameFile) applies to multiple objects.
check-task- taskid Determines whether user is allowed to perform
permission -user user the operation specified by op on the task specified
by taskid. See iwroleadm for a list of valid task
-op op operation names.
clear- vpath Clears a permission entry to the branch, store, or
permission- server specified by vpath, resetting its inherit
entries flag to true and private flag to false.

delegable- vpath Displays the roles that user can delegate to other
roles-of-user -user user users in the context of the specified vpath.

export- file Writes all branch, store, and server permission


permission- entries to the specified file, which must have an
entries absolute path.

group vpath Displays the owning group of the object specified


by vpath.
import- file Applies all branch, store, and server permission
permission- -clear entries in the specified file, which must have an
entries absolute path, to the server. If clear is specified,
any existing permission entries in the server for
the vpaths specified in file (only) are cleared
before applying the permission entries.
inheritance vpath Determines whether the branch or store specified
by vpath is set to inherit permission entries from
its parent container.
owner vpath Displays the owner of the object specified by
vpath.
permission- vpath Displays the permission entries for the branch,
entries store, or server specified by vpath.
-modinfo If specified, includes last modification
information.
-inherited If specified, included entries inherited from the
parent container.
-expand- If specified, groups are expanded recursively to
groups list only users.

TeamSite Command-Line Tools 27


Chapter 2: Administration Tools

private vpath Determines whether the branch or workarea


specified by vpath is private (readable only by
members of the branch or workarea) or public
(readable by everyone).
remove- vpath Removes a permission entry from the branch,
permission-entry -user user store, or server specified by vpath, revoking from
-role role user the permission to perform the operations
associated with role.
-group group Removes permission from a group specified by
group.
roles-of-user vpath Displays the roles that user has in the context of
-user user the specified vpath.
set-group vpath group Changes the owning group of the object specified
by vpath to the group specified by group.
set-inheritance vpath Specifies whether the branch or store specified by
true|false vpath inherits permissions from its parent
container.
set-owner vpath user Changes the owner of the object specified by
vpath to the user specified by user.
set-private vpath Marks the branch or workarea specified by vpath
true|false as private (readable only by members of the
branch or workarea) or public (readable by
everyone).
set-unix- vpath nnnn Changes the UNIX permissions mode of the file
permission -r or directory specified by vpath. The permissions
mode can be specified in octal form as nnnn,
where n is a number from 0 to 7. By default, the
permissions mode is set only on the current file or
directory. If -r is specified, the permissions mode
is set recursively to directories.
vpath Changes the UNIX permissions mode of the file
symbolic- or directory specified by vpath. The permissions
mode-list-r mode can be specified in symbolic form as
rwxrwxrwx. By default, the permissions mode is
set only on the current file or directory. If -r is
specified, the permissions mode is set recursively
to directories.
unix-permission vpath -n Displays the UNIX permissions mode of the file
or directory specified by vpath. The symbolic
form of the permission mode is returned by
default. If -n is specified, the permission mode is
returned as an octal number.

Examples

The following command displays whether the user dinesh is allowed to edit files in the
workarea /default/main/Workarea/andre :
% iwaccess check-permission /default/main/WORKAREA/andre -user dinesh -op
Edit

Interwoven, Inc. 28
Chapter 2: Administration Tools

The following command displays whether the user dinesh is allowed to modify the
properties of task 1234 in the workarea /default/main/Workarea/andre:
% iwaccess check-task-permission 1234 -user dinesh -op
ModifyTaskProperties

The following command grants to the user dinesh the permission to perform the
operations associated with the role dbadmin on the branch /default/main. This
example assumes that the TeamSite role dbadmin is already defined:
% iwaccess add-permission-entry /default/main -user dinesh -role dbadmin

The following command makes the user dinesh the owner of the branch
/default/main:
% iwaccess set-owner /default/main dinesh

NOTE
Execute iwroleadm -all-operations for a list of valid operation names.

TeamSite Command-Line Tools 29


Chapter 2: Administration Tools

iwaccessmigrate
Migrates the old access model from a pre-6.7 TeamSite release to the new access model.
Can instead generate an XML manifest file of permission, group, and role settings for
use before or after an upgrade from a pre-6.7 TeamSite release. To use this CLT, you
must have read permission across all stores on the content server.

The migration consists of the following steps:


1. On a per branch basis, the highest role of the owner of each branch is examined. If
this role is master or administrator, the owner is assigned an owner permission
entry with the administrator role (unless a different role is specified with the -b
option). Otherwise, ownership of the branch is transferred to the root user, who is
assigned an owner permission entry with the adminstrator role, and the original
owner, if their highest role was editor or author, is assigned an user permission
entry with that role.
2. If the -bg option is specified, its group-for-sharing is examined for each branch. If
the highest role of all TeamSite users in this group is either master or
administrator, a group permission entry is assigned with the administrator role
(unless a different role is specified with the -b option). Otherwise, unless either the
-n option is specified or no TeamSite users are in the branch’s group-for-sharing, a
TeamSite group is created for all users in this group-for-sharing with a highest role
of either master or administrator. The new group’s name is derived from the
branch’s vpath (unless a prefix is specified with the -p option) and a group
permission entry is assigned with the administrator role (unless a different role is
specified with the -b option). If the -n option was specified, then user permission
entries, with the administrator role, are created for these users instead. Finally, in
all cases, an additional group permission entry is assigned for the group-for-sharing
with the reviewer role.
3. On a per workgroup basis, the highest role of the owner of the workarea is
examined. If this role is either master, administrator, or editor, then the owner is
assigned a user permission entry with the editor role. If the owner’s highest role is
author, then the owner is assigned a user permission entry with the author role. (If
the owner has no role, then no permission entry is assigned.)
4. On a per workarea basis, each group-for-sharing is examined. If the highest role of
all TeamSite users in this group is either master, administrator, or editor, then a
group permission entry is assigned with the editor role. Otherwise, unless either
the -n option is specified or no TeamSite users are in the workarea’s
group-for-sharing, two TeamSite groups are created: one for all users in this
group-for-sharing with a highest role of either master, administrator, or editor,
and one for all users in this group-for-sharing with a highest role of author. The
new groups’ names are derived from the workarea’s vpath (unless a prefix is
specified with the -p option) and a group permission entry is assigned for the first
group with the editor role and for the second group with the author role. If the -n
option was specified, then user permission entries, with the appropriate roles, are
created for all TeamSite users in this group-for-sharing instead.

Interwoven, Inc. 30
Chapter 2: Administration Tools

5. At the server level, a group permission entry with the iwEveryone TeamSite group
and reviewer role is assigned.
6. On a per branch basis, if the branch’s “other” bits are 0 (that is, 770 or 750) and the
-i option is not specified, then the inherit-from-parent flag on the branch is set
to false. If the -i option is specified, the inherit-from-parent flag is always set
to true.

Man Page Group

System Services.

Usage
iwaccessmigrate [-h] [-v]
iwaccessmigrate [-o] [-bg] [-n] [-i] [-m] [-g] [-b role]
iwaccessmigrate [-o] [-bg] [-p group-prefix] [-i] [-m] [-g] [-b role]
iwaccessmigrate [-o] [-f file]

-h Prints usage message.


-v Prints version string.
-o Overrides store active check.
-bg Uses each branch’s group-for-sharing to construct the branch
permission entries.
-n Does not create new TeamSite groups when either members of a
branch’s group-for-sharing include some users who are editors
or authors or members of a workarea’s group-for-sharing
include some users who are authors.
-p group-prefix When creating new TeamSite groups (when members of a
branch’s group-for-sharing include some users who are editors
or authors or members of a workarea’s group-for-sharing
include some users who are authors), names them by prepending
the specified group-prefix, instead of the branch or workarea’s
vpath (the default behavior), to an internally generated number.
-i Sets the inherit-from-parent flag on each branch to always be
true.
-m Generates an accessresults.xml manifest file in the logging
directory showing permission, group, and role entries for all
TeamSite users. Does not migrate permissions.
-g Turns on logging.
-b role Specifies the role instead of administrator to be assigned to the
branch owner’s user permission entry and branch’s group
permission entry.
-f file Uses the specified manifest file (see -m option) to migrate
permissions.

TeamSite Command-Line Tools 31


Chapter 2: Administration Tools

Examples

The following command migrates the entire content server to the new access model.
Permissions are based on the existing TeamSite groups-for-sharing for each branch.
% iwaccessmigrate -bg

The following command accomplishes the same as the preceding command, except that
no new TeamSite groups will be created.
% iwaccessmigrate -bg -n

The following command generates a permissions manifest file, accessresults.xml, in


the logging directory. The content server is not migrated to the new access model.
% iwaccessmigrate -m

The following command applies permissions from a previously generated manifest file,
iw-home/etc/accessresults.xml.
% iwaccessmigrate -f iw-home/etc/accessresults.xml

Interwoven, Inc. 32
Chapter 2: Administration Tools

iwadduser
Adds a TeamSite user to the specified role files in iw-home/conf/roles and the entity
database.

Man Page Group

System services.

Usage
iwadduser [-h|-V] -user username -roles roleList

-h Displays usage message.


-V Verbose mode.
-user username The name of the user to be created.
-roles roleList Comma-separated list of roles to which this user is
assigned.

Example
% iwadduser -V -user jerome -roles master,admin

Adds the user jerome to TeamSite master and admin roles files.

TeamSite Command-Line Tools 33


Chapter 2: Administration Tools

iwancestor
Prints the vpath of the common ancestor of the specified files.

Man Page Group

System Information.

Usage
iwancestor [-i] vpath1 vpath2

-i Prints the ID of the ancestor instead of the vpath.


-h Prints usage message.
-v Prints the version string.

Interwoven, Inc. 34
Chapter 2: Administration Tools

iwchgrp
iwchgrp is equivalent to the UNIX chgrp command. Because TeamSite retains the
concept of group ownership of branches and workareas, iwchgrp allows you to change
the group of a file, directory, branch, workarea, or file system entity such as a link. To
change the group of a branch, workarea, or FSE, you must be the owner.

Man Page Group

System Services.

Usage
iwchgrp [-h|-v] group path

-h Displays usage message.


-v Displays version.
group Specifies the new domain and group name. Can be a TeamSite
group or an operating system group.
path Specifies the directory path (including the drive) to the
workarea.

Examples
%iwchgrp Administrators /default/main/dev/Workarea/andre

changes the group of workarea andre on the dev branch to the local group of
administrators.
%iwchgrp WEBSTER/Marketing /default/main/dev/Workarea/andre

changes the group of workarea andre on the dev branch to the Marketing group in the
WEBSTER domain.

TeamSite Command-Line Tools 35


Chapter 2: Administration Tools

iwconfig
A command line interface to TeamSite’s main configuration file, iw.cfg. Allows you to
read the configuration file, list the names of all the sections in the configuration file, or
write to the configuration file. For information on configuring iw.cfg, see the TeamSite
Administration Guide.

Man Page Group

System Services.

Usage
iwconfig [options] section varname [value]

-show Displays the entire configuration file.


-l Lists section names only.
-w Writes value into /etc/iw.cfg (creates new section and
variable if necessary).
-d Delete a name, value pair from a specified section.
-h Displays usage message.
-v Displays version.
section Section of iw.cfg to read or write to.
varname Variable name within section to read or configure.
value Value to assign to varname (use only with -w).

Example
%iwconfig -l

returns:
main
iwcgi
iwproxy
iwproxy_remap
global_default_map
iwproxy_external_remap
iwserver

% iwconfig -w iwserver branch_default_perm 775

sets the variable branch_default_perm in the iwserver section of iw.cfg to 775.


% iwconfig iwserver branch_default_perm

returns:

775

Interwoven, Inc. 36
Chapter 2: Administration Tools

iwconfigtsreport
A command line interface to the TeamSite Reporting configuration file
iw-home/tsreport/conf/tsreport.xml. Allows you to reset all parameters in the
configuration file. For information about file syntax, supported events, and other
reporting features, see the TeamSite Administration Guide.

Man Page Group

System Services.

Usage
iwconfigtsreport [-db*]
iwconfigtsreport -dbuser username -dbpasswd password
iwconfigtsreport -licensekey
iwconfigtsreport -jndiport

When specifying db* command line options (such as dbtype, dbserver, and so on), you
must use one of the following combinations:
„ All of the db* options (dbtype, dbserver, dbport, dbname, dbuser, and dbpasswd)
must be used together on the same command line, or
„ The dbuser and dbpasswd options must be used together on the same command line.

Specifying all db* options on the same command line sets the database type and
configures the schema. Specifying just dbuser and dbpasswd configures the database
user and password without creating the schema.

The db* options are as follows:

-dbtype mssql|oracle|mysql|db2 Specifies the reporting database type. Specifying


oracle applies to all supported Oracle databases.
Must be used together with all other -db* options.
-dbserver servername Specifies the reporting database server;
servername can be the name or IP address of the
database server. Must be used together with all
other -db* options.
-dbport portnumber Specifies the port used by the reporting database
on the database server. Must be used together
with all other -db* options.
-dbname databasename Specifies the reporting database name as defined
by the database administrator when the database
was created. This is also the database instance in
which the TeamSite reporting schema is created.
Must be used together with all other -db* options.
-dbuser username Adds a user to the list of reporting database user.
-dbpasswd password Resets the reporting database password;
password must meet the password criteria for the
reporting database type.

TeamSite Command-Line Tools 37


Chapter 2: Administration Tools

Additional options are as follows:

-license licensekey Installs a reporting license key.


-jndiport jndiportnumber Specifies the port number where the event
subsystem is running.
-h Displays usage message.

Examples
%iwconfigtsreport -dbtype mssql -dbname db1 -dbserver server1 -dbport 8085
-dbuser shashi -dbpasswd asdfjkl

sets the reporting database type to MS SQL Server 2000 and configures the schema.

%iwconfigtsreport -dbuser shashi -dbpasswd asdfjkl

sets the database user name and password.

%iwconfigtsreport -license akdjk23039al

sets the license key.

Interwoven, Inc. 38
Chapter 2: Administration Tools

iwconvertserver
The iwconvertserver process supports the Content Store conversion GUI by
communicating with remote TeamSite servers. You must run the iwconvertserver
process manually for the GUI to function properly.

Man Page Group

Content Store.

Usage
iwconvertserver [-h|-v|-V level]

General Options

-h Print this message


-v Print version
-V level Specify verbose logging level (1-5, default is 1)

Procedure
1. Change to the iw-home/bin directory, for example:
%cd /iw-home/bin
2. Run the iwconvertserver utility from iw-home/bin with no arguments.

TeamSite Command-Line Tools 39


Chapter 2: Administration Tools

iwfreeze
Freezes and unfreezes all system writes. Unlike a full server stop, users can still log into
the system and read data.

To determine whether the TeamSite server is currently frozen, use the iwstat (page 77)
command-line tool.

Man Page Group

System Services.

Usage
iwfreeze [-h|-v|+N|-j|--] [backing_store]

-h Displays usage message.


-v Displays version.
+N Freeze for N seconds.
-j Freeze or unfreeze only batch jobs, not the entire Content
Store. As currently supported, batch jobs result from a Delete
Area operation and accomplish the following: clean up
destroyed workareas, editions, and branches.
-- Unfreeze archive immediately.
backing_store Perform operation only on specified Content Store. If this
option is not specified, perform operation on all active backing
stores.

Examples
%iwfreeze +30

returns:
Freeze archive default for 30 seconds...

and freezes the TeamSite archive for thirty seconds.

%iwfreeze --

returns:
Archive default unfrozen.

and unfreezes the archive.

Interwoven, Inc. 40
Chapter 2: Administration Tools

Notes
„ When iwfreeze is issued, the system performs the following activities:
„ Blocks new operations.
„ Completes all current operations.
„ Flushes the cache.
„ Issues a message telling users an iwfreeze has occurred.
„ Returns write operations with a failure status message.
„ Performs read-only operations.

TeamSite Command-Line Tools 41


Chapter 2: Administration Tools

iwfsck
Diagnoses Content Store problems and enables repair of some of the problems found.

Man Page Group

Content Store.

Usage
iwfsck [-h] [-v] [-xxx] [-l] [-a] [-b path] [-c size] [vpath]
[-nofmtchk] [-z] [-d [-f] [-s] [-m] [-p] [-r]]

-h Displays usage message.


-v Displays version.
-x Requests extra output and increments verbosity level. Prints
additional information about what iwfsck is doing as it
operates. Each x increments the verbosity level by 1. The
highest level of verbosity is level 3 (-xxx). In the higher levels
of verbosity, an extremely large quantity of output may be
produced.
-c size Sets internal cache size (for debugging iwfsck only).
-w size Sets nominal fastwalk memory limit (default is unlimited, size
greater than 192 recommended if this option is used).
-l Prints output as HTML. This option is used by the
iwfsckcgi.cgi program.
-a Checks areas within all branches.
-b path Uses path as the Content Store location. The default is the
configured Content Store location returned by iwgetstore for
the TeamSite server.
-nofmtchk Inhibits validation of FORMAT files.
-z Checks events in branches.
-d Checks directories and files in addition to the normal checking
of branches and areas. All directories and files from the vpath
are walked. If a vpath is not specified on the command line,
the walk begins at the / vpath.

Interwoven, Inc. 42
Chapter 2: Administration Tools

The following options are only allowed when -d is specified:

-unpub Checks directories and files in unpublished editions. This is


very memory intensive and is not recommended. If you do use
this option, using -s also will reduce memory usage, but will
be very slow.
-f Provides a fast reference check (not allowed with -p, -m, or
-s). All references from the root are walked aggressively
looking for missing references. If a missing reference is found,
that part of the tree is marked suspect, and a more expensive
walk with vpaths is done on that part of the tree to determine
the directories and files affected by the problem.
-s Provides a stack walk, which is slower but uses less memory
than the default (not allowed with -f). This mode uses the least
amount of memory, but it is the least efficient for walking the
entire tree of files and directories from the root.
-m Checks ModLists for directories. A ModList is a data structure
that is a shadow tree to the directory structure within a
workarea. This shadow tree allows the modified files within a
workarea to be determined quickly without having to traverse
every file and directory within a workarea.
-p Checks protopaths. A protopaths is a data structure that allows
file names and history information to be determined without
the expense of walking up to the root of an area through
directories; however, it can be expensive.
-r Checks parents. Parents and anti-parents are the reference
counting mechanism used by the TeamSite server. If zero
parents are found for a file, it indicates a problem. It can be
expensive.

Examples

To check areas and branches, issue the command:

% iwfsck

To check directories and files in addition to branches and areas, issue the command:
% iwfsck -d

Use the following command to check protopaths and parents in addition to branches,
areas, directories, and files. This command can be very resource intensive.
% iwfsck -d -p -r

TeamSite Command-Line Tools 43


Chapter 2: Administration Tools

iwfsfix
The iwfsfix command repairs certain problems. If iwfsck (see page 42) finds problems
when the Content Store is diagnosed, it outputs lines in the format:
FIX iwfsfix repair args

The repairs and their arguments are shown below. The content of these lines, following
the word FIX, are iwfsfix command lines. To perform repairs, copy the FIX line issued
by iwfsck and paste it on the command line, with the word FIX removed.

There are also repairs for ModLists that must be performed when the TeamSite server is
running. These lines are in the format:
FIX /bin/touch junkfile; /bin/rm junkfile

where junkfile is a uniquely named file that is created and removed from an affected
directory.

The repairs that can be performed with iwfsfix are:


„ delete_tag branch_id tag_id

Removes the reference to a tag (lock) from a branch. This is done when the tag point
itself is missing.
„ delete_tag_and_point branch_id tag_id

Deletes the reference to a tag (lock) from a branch and removes the tag point itself.
This is done when a tag duplicates or conflicts with another tag within a branch.
„ delete_direntry directory_id diritems_index filename

Deletes the directory entry for a damaged or missing file.


„ replace_direntry directory_id diritems_index filename new_standin_id

Repairs a directory entry to point to a correct standin ID.


„ delete_area area_id

Deletes the point for an area.


„ delete_area_from_branch branch_id area_id workarea | edition

Deletes the reference to an area (workarea or edition) from a branch. This cannot be
done on a staging area because a branch by definition always contains a staging
area.
„ null_previous point_id

Sets to null (-1) the PreviousPoint reference within a point. This is done when the
PreviousPoint reference for a point is incorrect.
„ clone_diritems directory_id diritems_index new_gen_id new_dot_dot

Clones a set of directory items within a directory to create a new set. This is done
when a set of directory items is shared between areas, but it should not be shared.

Interwoven, Inc. 44
Chapter 2: Administration Tools

iwfsshrink
Invokes a batch job in the server to find and remove duplicate file contents in the
Content Store. This command is used to improve space usage in an existing Content
Store. It can be used as a maintenance tool on a regular, perhaps quarterly, basis. This
operation results in no user-visible changes to the TeamSite virtual file system; for
example, file histories are unchanged.

Man Page Group

Content Store.

Usage
iwfsshrink [-h|-v] [run|pause|abort|status] [store]

-h Displays usage message.


-v Displays version.
run Starts the iwfsshrink process.
pause Temporarily stops the iwfsshrink process. It can be restarted
with the run option. Because iwfsshrink takes a long time to
run and it increases system load, you may want to start it
during off-hours. When activity increases, you can pause it
until the next period of inactivity.
abort Terminates the iwfsshrink process.
status Shows information about the iwfsshrink process.
store The name of the Content Store to shrink. If no store is
specified, the default store is assumed.

Examples

Issuing iwfsshrink status when iwfsshrink has finished running results in status
similar to:

Not currently running.


Last started Mon Jun 26 15:47:53 2000
Last completed Tue Jun 27 00:40:04 2000
Files examined: 317974
Bytes examined: 75936814830
Files found to be duplicates: 233430
Files converted: 198352
Bytes removed: 23455046531

TeamSite Command-Line Tools 45


Chapter 2: Administration Tools

Issuing the iwfsshrink run command, followed by the iwfsshrink status command,
results in status similar to:
Current run started Tue Jul 11 14:19:20 2000
Not yet completed
In phase 1
Files examined: 980
Bytes examined: 67053122
Files found to be duplicates: 0
Files converted: 0
Bytes removed: 0

Issuing the iwfsshrink pause command, followed by the iwfsshrink status


command, results in status similar to:
Current run started Tue Jul 11 14:19:20 2000
Paused
In phase 1
Files examined: 5694
Bytes examined: 1191581411
Files found to be duplicates: 0
Files converted: 0
Bytes removed: 0

Interwoven, Inc. 46
Chapter 2: Administration Tools

iwgetelog
Displays the contents of /etc/defaultiwelog (the TeamSite events log) or exits with a
nonzero error code. The TeamSite events log includes the time an operation was
performed, the username and role of the user, the type of operation, the area or file
affected, and additional information according to the type of operation performed (for
example, objids and comments attached to files and operations).

Man Page Group

System Information.

Usage
iwgetelog [-h|-v|-o]

-h Displays usage message.


-v Displays version.
-o Returns original factory setting value.

Example
% iwgetelog

returns:
/var/adm/iwevents.log

TeamSite Command-Line Tools 47


Chapter 2: Administration Tools

iwgetfilejobs
Displays a list of associated workflow job and task IDs for a file.

Man Page Group

System Information.

Usage
iwgetfilejobs [-h] [-v] [-s servername] path

-h Displays usage message.


-v Displays version.
-s Specifies the TeamSite server where the file resides.
path Path to look up (including the file name).

Example
% iwgetfilejobs -s factotum /default/main/WORKAREA/kconnor/foo.txt

returns:
job=125998 task=125999

You can use the returned job or task ID with a command like iwgetwfobj as described
on page 139.

Interwoven, Inc. 48
Chapter 2: Administration Tools

iwgethome
Displays the location of the TeamSite program files (the contents of
/etc/defaultiwhome).

Man Page Group

System Information.

Usage
iwgethome [-h|-v]

-h Displays usage message.


-v Displays version.

Example
% iwgethome

returns
/usr/iw-home

TeamSite Command-Line Tools 49


Chapter 2: Administration Tools

iwgetlocation
Displays the location of various TeamSite configuration or log files.

Man Page Group

System Information.

Usage
iwgetlocation [-h|-v] [-a|-l|-c configfilekey|-g logfilekey|filekey
[filekey...]]

-h Displays usage message.


-v Displays version.
-a Returns all locations of all configuration and log files.
-l Lists all filekeys.
-c configfilekey Specifies a configuration file.
-g logfilekey Specifies a log file.
filekey Specifies a particular configuration or log file.

Examples
% iwgetlocation -l

returns:
iwhome
iwbin
iwconfig
iwstore
iwmount
iwcgimount
iwroles
iwlogs
iwconfigs
iweventlog
iwtracelog
iwdeploylog

% iwgetlocation -a

returns:
iwhome=/usr/iw-home
iwbin=/usr/iw-home/bin
iwconfig=/etc/iw.cfg
iwstore=/local/iw-store
iwmount=/iwmnt

Interwoven, Inc. 50
Chapter 2: Administration Tools

iwcgimount=/.iwmnt
iwroles=/usr/iw-home/conf/roles
iwlogs=/var/adm
iwconfigs=/usr/iw-home/local/config
iweventlog=/var/adm/iwevents.log
iwserverlog=/var/adm/iwserver.log
iwtracelog=/var/adm/iwtrace.log
iwdeploylog=/var/adm/iwdeploy.log

% iwgetlocation iwmount

returns:
/iwmnt

% iwgetlocation -c iwconfig

returns:
/etc/iw.cfg

% iwgetlocation iwmount iwconfig iweventlog

returns:
/iwmnt
/etc/iw.cfg
/var/adm/iwevents.log

TeamSite Command-Line Tools 51


Chapter 2: Administration Tools

iwgetlog
Displays the contents of /etc/defaultiwlog (the location of the TeamSite server log)
or exits with a nonzero error code. The TeamSite server log contains a record of server
starts and stops, and records any problems encountered at server starts and stops.

Man Page Group

System Information.

Usage
iwgetlog [-h|-v|-o]

-h Displays usage message.


-v Displays version.
-o Returns original factory setting value.

Example
% iwgetlog

returns:
/var/adm/iwserver.log

Interwoven, Inc. 52
Chapter 2: Administration Tools

iwgetmount
Displays the location of TeamSite mount point (the contents of /etc/defaultiwmount).

Man Page Group

System Information.

Usage
iwgetmount [-h|-v|-o]

Displays the contents of /etc/defaultiwmount or exits with a non-zero error code.

-h Displays usage message.


-v Displays version.
-o Returns original factory setting value.

Example
% iwgetmount

returns:
/iwmnt

TeamSite Command-Line Tools 53


Chapter 2: Administration Tools

iwgetstore
Displays the contents of /etc/defaultiwstore (the location of the TeamSite Content
Store) or exits with a non-zero error code.

Man Page Group

System Information.

Usage
iwgetstore [-h|-v|-o]

-h Displays usage message.


-v Displays version.
-o Returns the original default value.

Example
% iwgetstore

returns:
/local/iw-store

Interwoven, Inc. 54
Chapter 2: Administration Tools

iwgettrace
Displays the contents of /etc/defaultiwtrace (the location of the TeamSite trace logs)
or exits with a nonzero error code. The trace log contains debug information for
TeamSite.

Man Page Group

System Information.

Usage
iwgettrace [-h|-v|-o]

-h Displays usage message.


-v Displays version.
-o Returns the original default value.

Example
% iwgettrace

returns:
/var/adm/iwtrace.log

TeamSite Command-Line Tools 55


Chapter 2: Administration Tools

iwgroup
Administers TeamSite groups.

Man Page Group

System Services.

Usage
iwgroup -h [command]|-v

iwgroup add-admins groupname [user+]

iwgroup add-included-groups groupname [include_group+]

iwgroup add-member -u user groupname


iwgroup add-member -g group groupname
iwgroup add-member -if inputfile [-of outputfile]

iwgroup add-users groupname [user+]

iwgroup create groupname [-id idnumber]


iwgroup create -if inputfile

iwgroup delete groupname


iwgroup delete -if inputfile

iwgroup description groupname

iwgroup display-name groupname

iwgroup id groupname

iwgroup list-admin-groups-of-user user

iwgroup list-admins groupname [- recurse]

iwgroup list-groups -u user


iwgroup list-groups -a
iwgroup list-groups -o

iwgroup list-groups-of-user user [- recurse]

iwgroup list-included-groups groupname [-recurse]

iwgroup list-members groupname

iwgroup list-users groupname [-recurse]

Interwoven, Inc. 56
Chapter 2: Administration Tools

iwgroup mod -id idnumber groupname


iwgroup mod -n name groupname

iwgroup remove-admins groupname [user+]

iwgroup remove-included-groups groupname [include_group+]

iwgroup remove-member -u user groupname


iwgroup remove-member -g group groupname
iwgroup remove-member -if inputfile [-of outputfile]

iwgroup remove-users groupname [user+]

iwgroup set-description groupname description

iwgroup set-display-name groupname display_name

iwgroup set-id groupname idnumber

-h command Displays iwgroup usage information for command, or


general iwgroup usage information if command is
omitted.
-v Displays version.
add-admins groupname Adds one or more users as administrators for the
group specified by groupname.
user+ Specifies the name(s) of the user(s) to add as
administrators of the group. If no users are specified
on the command line, standard input is read.
add-included- groupname Adds one or more included groups to the TeamSite
groups group specified by groupname in
iw-home/conf/tsgroups.xml
include_ Specifies the name(s) of the included group(s) to
group+ add to the group. If no included groups are specified
on the command line, standard input is read.
add-member Adds a user, an OS group, or a TeamSite group to an
existing TeamSite group. Additions are made to
iw-home/conf/tsgroups.xml (if -of is not used) or
to a file that you specify with the -of option.
-u user Adds the specified user ID to the group named by
groupname groupname.
-g group Adds the specified TeamSite or OS group ID to the
groupname group named by groupname.
-of Specifies the path of a file to which the member is
outputfile added.
-if Specifies the path of a file containing a list of users
inputfile or groups to add. See page 61 for file syntax.

TeamSite Command-Line Tools 57


Chapter 2: Administration Tools

add-users groupname Adds one or more users to the group specified by


groupname.
user+ Specifies the name(s) of the user(s) to add to the
group. If no users are specified on the command
line, standard input is read.
create groupname Creates a new TeamSite group named groupname.
The new group is added to the
iw-home/conf/tsgroups.xml file. Also use create to
create the initial version of
iw-home/conf/tsgroups.xml.
-id Assigns the ID specified by idnumber to the group.
idnumber An ID number can be any integer from 1 to infinity.
An error message is displayed if you attempt to give
an invalid number. If the number that you specify is
already taken, the next available number is assigned.
-if Specifies the path of a file containing a list of
inputfile groups or users to add. See page 61 for file syntax.
delete groupname Deletes the TeamSite group specified by groupname
from iw-home/conf/tsgroups.xml.
-if Specifies the path of a file containing a list of
inputfile groups to delete. See page 61 for file syntax.
description groupname Displays the value of the description attribute for
the group specified by groupname.
display-name groupname Displays the value of the display-name attribute for
groupname.
id groupname Displays the id number of groupname. An ID
number can be any integer from 1 to infinity.
list-admin- user Displays a list of groups for which user has
groups-of-user administrator permission.
list-admins groupname Displays a list of users in the group specified by
groupname who have the administrator role.
-recurse If specified, displays a list of administrators from
recursively included groups.
list-groups Displays a list of TeamSite groups. To display
information about the default TeamSite group file
iw-home/conf/tsgroups.xml, do not use the -if
option.
-u user Displays all groups to which the specified user
belongs.
-a Displays the name, display name, description, and
iwgid of all TeamSite groups.
-o Displays the name and display name of all OS
groups.
list-groups-of- user Displays all groups to which the specified user
user directly belongs.
-recurse If specified, displays groups to which user
indirectly belongs through nesting.

Interwoven, Inc. 58
Chapter 2: Administration Tools

list-included- groupname Displays a list of groups included in groupname.


groups
-recurse If specified, displays a list of groups from
recursively included groups.
list-members groupname Displays information about the TeamSite group
specified by groupname in the default TeamSite
group file
iw-home/conf/tsgroups.xml.
list-users groupname Displays a list of the users included in groupname.
-recurse If specified, displays a list of users from recursively
included groups.
mod Modifies the name or ID of a TeamSite group in the
default TeamSite group file
iw-home/conf/tsgroups.xml.
-id Changes the id to the number specified by
idnumber idnumber.
groupname Specifies the TeamSite group on which to perform
the modification.
-n name Changes the group name to the string specified by
name.
remove- groupname Removes administrator permissions for one or more
admins users in the group specified by groupname.
user+ Specifies the name(s) of the user(s) to remove as
administrators of the group. If no users are specified
on the command line, standard input is read.
remove- groupname Removes one or more included groups from the
included- TeamSite group specified by groupname in
groups iw-home/conf/tsgroups.xml

include_ Specifies the name(s) of the included group(s) to


group+ remove from the group. If no included groups are
specified on the command line, standard input is
read.
remove- Removes a user, an OS group, or a TeamSite group
member from an existing TeamSite group. Removals are
made from
iw-home/conf/tsgroups.xml (if -of is not used) or
from a file that you specify with the -of option.
-u user Deletes the specified user ID from the group named
groupname by groupname.
-g group Deletes the specified TeamSite or OS group ID from
groupname the group named by groupname.
-of Specifies the path of a file from which the member
outputfile is deleted.
-if Specifies the path of a file containing a list of users
inputfile or groups to delete. See page 61 for file syntax.
remove-users groupname Deletes one or more users from the group specified
by groupname.

TeamSite Command-Line Tools 59


Chapter 2: Administration Tools

user+ Specifies the name(s) of the user(s) to delete from


the group. If no users are specified on the command
line, standard input is read.
set- groupname Changes the value of the description attribute of
description groupname.
description Specifies the string used for the value of the
description attribute.
set-display-name groupname Changes the value of the display-name attribute of
groupname.
display_ Specifies the string used for the value of the
name display-name attribute.
set-id groupname Changes the id number for groupname. An ID
number can be any integer from 1 to infinity. An
error message is displayed if you attempt to give an
invalid number. If the number that you specify is
already taken, the next available number is assigned.
idnumber Specifies the new value of the id.

Examples

% iwgroup create headquarters -77

adds the empty TeamSite group headquarters with an ID of 77 to the default TeamSite
group file iw-home/conf/iwov.grp.

% iwgroup create -if /usr/dinesh/engr.xml -of /usr/eng/master.xml

adds all TeamSite groups contained in engr.xml (as defined by the iwgroup elements) to
the TeamSite group file master.xml.

% iwgroup delete headquarters

deletes the TeamSite group headquarters from the default TeamSite group file
iw-home/conf/iwov.grp.

% iwgroup delete -if /usr/dinesh/engr.xml -of /usr/eng/master.xml

Deletes all TeamSite groups contained in engr.xml (as defined by the iwgroup
elements) from the TeamSite group file master.xml.

% iwgroup add-member -u dinesh headquarters

Adds the user dinesh to the TeamSite group headquarters in the default TeamSite
group file iw-home/conf/iwov.grp.

% iwgroup add-member -g sveng -of /usr/eng/master.xml

Adds the OS group sveng to the TeamSite group file master.xml.

Interwoven, Inc. 60
Chapter 2: Administration Tools

% iwgroup add-member -if /usr/dinesh/engr.xml -of /usr/eng/master.xml

Adds all TeamSite users and groups contained in engr.xml (as defined by the user and
group elements) to the TeamSite group file master.xml.

% iwgroup list-groups -a

Displays a list of all TeamSite groups in the default TeamSite group file
iw-home/conf/iwov.grp.

% iwgroup list-members sveng

Displays a list of all members of the TeamSite group sveng in the default TeamSite
group file iw-home/conf/iwov.grp.

% iwgroup list-members -if /usr/dinesh/engr.xml sveng

Displays a list of all members of the TeamSite group sveng in the TeamSite group file
engr.xml.

% iwgroup mod -id 3 sveng

Changes the ID of the TeamSite group sveng to 3 in the default TeamSite group file
iw-home/conf/iwov.grp.

% iwgroup mod -n svengnew -if /usr/dinesh/engr.xml sveng

Changes the name of the TeamSite group sveng to svengnew in the TeamSite group file
engr.xml.

NOTE
The following files show the formats used by TeamSite group files as specified by
inputfile.

Format for inputfile when used with the create option:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>


<iwgroups>
<iwgroup name="newgroup1" id="1"/>
<iwgroup name="newgroup2" id="2"/>
<!-- id is optional. If an id is given, tries to give this id.
If it is already taken by another group,
the next available id is given -->
</iwgroups>

TeamSite Command-Line Tools 61


Chapter 2: Administration Tools

Format for inputfile when used with the delete option:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>


<iwgroups>
<iwgroup name="newgroup1"/>
<iwgroup name="newgroup2"/>
</iwgroups>

Format for inputfile when used with the add-member option:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>


<iwgroups>
<iwgroup name="newgroup1">
<user name="newuser1"/>
<group name="newgroup2"/>
</iwgroup>
<iwgroup name="newgroup2">
<user name="newuser2"/>
<user name="newuser3"/>
</iwgroup>
</iwgroups>

Format for inputfile when used with the remove-member option:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>


<iwgroups>
<iwgroup name="newgroup1">
<user name="newuser1"/>
<group name="newgroup1"/>
</iwgroup>
<iwgroup name="newgroup2">
<user name="newuser2"/>
<user name="newuser3"/>
</iwgroup>
</iwgroups>

Interwoven, Inc. 62
Chapter 2: Administration Tools

iwidmap
The iwidmap CLT changes the mapping between the UID and the token. It can also be
used to refresh the mapping when the same names are used, and the UID has changed.
For more information about UID mapping, see the TeamSite Administration Guide.

Man Page Group

Content Store.

Usage
iwidmap [-v] [-h] (-u | -g) [-a][-c user1 user2]
[-x file | -i file] backing-store

-v Displays the version of this program.


-h Displays the usage message.
-u Update userid mapping.
-g Update groupid mapping.
-a Update all entries in the ID map.
-c user1 user2 Update user1 to user2.
-x file Extract to file.
-i file Import from file.
backing-store Location of the Content Store.

NOTES
„ When OS users or groups are imported or exported, only the OS IDs (“ID” for both
users and groups) are imported/exported.
„ When non-OS users or groups are imported or exported, only the TeamSite IDs
(“IWUID” or “IWGID”) are imported/exported.IWUID is the tsid attribute set in
tsusers.xml while IWGID is the id attribute set in tsgroups.xml.

Examples

To change the mapping for a single user:


% iwidmap -u -c jgarcia rhunter /iw-store/NewReleases

To change the mapping for multiple users:


% iwidmap -u -x /idmap.xml /iw-store/NewReleases

To change the mapping for multiple users and edit idmap.xml so that old names are
replaced with new names:
% iwidmap -u -i /idmap.xml -a /iw-store/NewReleases

TeamSite Command-Line Tools 63


Chapter 2: Administration Tools

iwmigrate
The iwmigrate CLT accepts TeamSite 6.x Content Stores as its source. It can be used to
split a single Content Store into multiple Content Stores, or to move the contents of a
store to another location without losing the history of submit events for the editions.

Man Page Group

Content Store.

Usage
iwmigrate [-h] [-v] [-x] [-m mount_location] -o new_backing_location
[-b branch_vpath] [-s starting_ed] [-e ending_ed] [-t timeout] [-c] [-d]
[-f] [-l] [-a cache_size] [-w [only] [-file path | workarea_name]

-h Display this message.


-v Display version number.
-b branch Specify source branch for migration.
-x Increase verbosity level. Maximum verbosity is level
3, expressed as:
-x -x -x.
-m mount_location Specify mount location of Content Store, for example:
/iwmnt/default
-o new_backing_location Specify new Content Store location.
-d Do not recursively convert subbranches.
-s starting_ed Specify starting edition for migration. Default is the
INITIAL edition (this option can only be used with -d).
-e ending_ed Specify ending edition for migration. Default is the
most recent edition (this option can only be used with
-d).
-t timeout Time in minutes for the process to run.
-f Full clone of every edition (does not preserve history).
-c Clean up history information (use on the final pass).
-l locale Specify the native locale of the Content Store being
migrated (if different from LC_LOCALE for this system).
-a cache_size Number of objects kept in the cache. The default is
30,000 objects.
-w Migrate workareas within branches specified by the -b
option using a file containing a list of workareas or by
specifying the workareas.

Interwoven, Inc. 64
Chapter 2: Administration Tools

Example
% iwmigrate -m iwmnt/default -o /iw-store/safari_on_line
-b /default/main/examples

For the branch specified by -b option, migrate all the workareas using -w by itself:
% iwmigrate -m /iwmnt/default -b /default/main
-o /local/new-store/default -w

For the branch specified by -b option, migrate the workareas named


workarea_name0,…..workarea_nameN using the -w workarea_name format:
% iwmigrate -m /iwmnt/default -b /default/main -o /local/new-store/default
-w wa1,wa2

For the branch specified by -b option, migrate all the workareas listed in the file using
the -w -file file_name format:
% iwmigrate -m /iwmnt/default -b /default/main -o /local/new-store/default
-w -file filename

NOTE
file_name is a file containing a list of workarea names.

For the branch specified by -b option, migrate only named workareas or the workareas
listed in the file using the -w -only [[-f file_name] | [workarea_name]] format:
% iwmigrate -m /iwmnt/default -b /default/main -o /local/new-store/default
-w -only
% iwmigrate -m /iwmnt/default -b /default/main -o /local/new-store/default
-w -only wa1,wa2
% iwmigrate -m /iwmnt/default -b /default/main -o /local/new-store/default
-w -only -file file_name

Using the -only option means that editions will not be migrated.

TeamSite Command-Line Tools 65


Chapter 2: Administration Tools

iwprefconv
The SetHomePage functionality stores the home page information in the entity database
instead of the iwprofiles directory.

If you are upgrading from a pre-5.5.1 release of TeamSite, you must run the iwprefconv
CLT once to copy any existing home page information from the iwprofiles directory
(iw-home/local/iwprofiles) to the entity database (iw-home/local/entities/data).

If you are installing TeamSite without upgrading from a previous TeamSite release, the
home page information is stored in the entity database by default.

To run the iwprefconvCLT, iwserver must be running and you must be logged on as the
root user.

Man Page Group

System Services.

Usage
iwprefconv

(The CLT does not accept any parameters.)

Interwoven, Inc. 66
Chapter 2: Administration Tools

iwproxy
Invokes and debugs the proxy server. The proxy server is automatically invoked at
startup time.

Man Page Group

System Services.

Usage
iwproxy [-h|-v|-d|-x]

-h Displays usage message.


-v Displays version.
-d Debug mode (outputs client and server headers).
-x Extended debug mode (verbose output).

Example
% iwproxy -d

returns:
Using tickets for authentication
Using newfangled blobs
[iwproxy] max_connections (default): 100
[iwproxy: using gethostname() for local hostname: factotum]
[iwproxy: changed local hostname to result of gethostbyname(factotum):
factotum.interwoven.com]
[iwproxy] listening at http://factotum.interwoven.com:1080
[iwproxy] using customer web server at http://factotum.interwoven.com:81
[iwproxy] using servlet engine at http://localhost:8080/iw-ts
[iwproxy] using iwwebd at http://fully.qualified.hostname.com:80
[external remap configuration]
[name not set]
key: 0
docroot: [no docroot specified]
[local remap configuration]
/
key: 0
docroot: [no docroot specified]

TeamSite Command-Line Tools 67


Chapter 2: Administration Tools

iwrecentusers
Displays a list of everyone who has used TeamSite since the last time the TeamSite
server was started. The list also contains a timestamp of each user’s most recent
TeamSite operation.

Man Page Group

System Information.

Usage
iwrecentusers [-h|-v|-Gn]

-h Displays usage message.


-v Displays version information.
-G0 Output is tab-separated. If a field is longer than the tab, then
alignment will be erratic.
-G1 Output is neatly formatted (default). Field width is adjusted for
the longest value in the column and is aligned.

Example
%iwrecentusers

returns:
bgunn Mon Sep 16 16:17:08 2004
umaster Fri Sep 13 14:07:59 2004
jgarcia Fri Sep 13 14:05:12 2004
nobody Wed Sep 11 15:34:55 2004
root Mon Sep 9 13:05:02 2004

Interwoven, Inc. 68
Chapter 2: Administration Tools

iwreset
Tells the TeamSite server to reread the TeamSite configuration files (iw.cfg,
submit.cfg, autoprivate.cfg, and the roles files) and resets iwserver based on the
values in the configuration files.

This CLT must be run on the TeamSite server host system.

Man Page Group

System Services.

Usage
iwreset [-a|-h|-ui|-v]

-a Reread configuration and then reset iwserver and restart ui


services (as if both the iwreset and iwreset -ui commands
had been issued).
-h Displays usage message.
-ui Restart (stopping if necessary) the following ui services:
iwwebd, iwproxy, iwservletd.
-v Displays version.

Example
% iwreset

Tells the TeamSite server to read the TeamSite configuration files and reset iwserver.

Notes
„ Exits with 0 on success, non-zero on failure.
„ All except the following iw.cfg settings are reset when iwreset executes. You must
restart TeamSite for the following settings to reset.
‰ Cache size (set in [iwserver])
‰ File system thread count (set in [iwserver])
‰ File system active area cache (set in [iwserver])
‰ File locations (set in [locations])

TeamSite Command-Line Tools 69


Chapter 2: Administration Tools

iwrmuser
Removes a TeamSite user from all role files in iw-home/conf/roles and the entity
database.

Man Page Group

System Services.

Usage
iwrmuser -h|-v [-V] username

-h Displays usage message.


-v Displays version information.
-V Displays optional verbose status messages.
username The user to remove.

Example
% iwrmuser.ipl jerome

Removes the user jerome from TeamSite. Note that unlike iwadduser, you cannot
selectively remove users from specific role files.

Interwoven, Inc. 70
Chapter 2: Administration Tools

iwroleadm
Administer roles for TeamSite users and groups.

Man Page Group

System Services.

Usage
iwroleadm -h [command]|-v

iwroleadm add-delegable-roles role [delegable_role+]

iwroleadm add-operations role [operation+]

iwroleadm all-operation-categories [-verbose]

iwroleadm all-operations [-verbose]

iwroleadm all-roles

iwroleadm create role

iwroleadm create-custom-operation name display_name description category

iwroleadm delegable-roles role

iwroleadm delete role

iwroleadm description role

iwroleadm display-name role

iwroleadm locking-model role

iwroleadm operations role

iwroleadm remove-custom-operations opname [opname...]

iwroleadm remove-delegable-roles role [delegable_role+]

iwroleadm remove-operations role [operation+]

iwroleadm replace-delegable-roles role [delegable_role+]

iwroleadm replace-operations role [operation+]

iwroleadm set-description role description

TeamSite Command-Line Tools 71


Chapter 2: Administration Tools

iwroleadm set-display-name role display_name

iwroleadm set-locking-model role S | O | M | U

iwroleadm set-workarea-permission-override role true|false

iwroleadm set-workflow-permission-override role true|false

iwroleadm workarea-permission-override role

iwroleadm workflow-permission-override role

-h command Displays iwroleadm usage information for command, or


general iwroleadm usage information if command is
omitted.
-v Displays version.
add- role Adds one or more delegable roles to role. Standard
delegable- input is read if no delegable roles are specified on the
roles command line.
delegable_ Specifies the delegable role(s) to add.
role+
add- role Adds one or more operations to the list of operations
operations that role is allowed to perform. Standard input is read
if no operations are specified on the command line.
operation+ Specifies the operation(s) to add.
all- -verbose Displays all operation categories. If specified,
operation- -verbose provides additional information about each
categories category.
all- -verbose Displays all operations that a role can be configured to
operations perform. If specified, -verbose provides additional
information about each operation.
all-roles Displays all currently defined roles.
create role Creates a new empty role named role. The role name
must consist of a letter followed by one or more letters,
digits, or underscores.
create- opname Creates a new custom operation called opname in the
custom- userops_ui.xml or userops.xml file. See the “Notes”
operation section for file locations.
display_name Specifies the display-name attribute for the operation.
description Specifies the description attribute for the operation.
category Specifies the category for the operation. This must be
an existing category as defined by the
operation-category attribute in userops_ui.xml or
userops.xml.
delegable- role Displays the roles that role can delegate.
roles

Interwoven, Inc. 72
Chapter 2: Administration Tools

delete role Deletes the role.


description role Displays the description attribute of role.
display-name role Displays the display-name attribute of role.
locking- role Displays the value of the locking-model attribute of
model role.
operations role Displays the operations that role is allowed to
perform.
remove- opname Removes the specified custom operations from
custom- opname... userops_ui.xml. Operations defined in other files
operations cannot be removed.
remove- role Removes one or more delegable roles from role.
delegable- Standard input is read if no delegable roles are
roles specified on the command line.
delegable_ Specifies the delegable role(s) to remove.
role+
remove- role Removes one or more operations from the list of
operations operations that role is allowed to perform. Standard
input is read if no operations are specified on the
command line.
operation+ Specifies the operation(s) to remove.
replace- role Replaces all existing delegable roles pertaining to role
delegable- with one or more new delegable roles. Standard input is
roles read if no operations are specified on the command
line.
delegable_ Specifies the new delegable role(s).
role+
replace- role Replaces all existing operations that role is allowed to
operations perform with one or more new operations. Standard
input is read if no operations are specified on the
command line.
operation+ Specifies the new operation(s).
set- role Changes the value of the description attribute of role
description description to the value specified by description.
set-display- role Changes the value of the display-name attribute of role
name display_name to the value specified by display_name.
set-locking- role Specifies the locking model for role.
model
S Submit locking.
O Optional write locking.
M Mandatory write locking.
U User mandatory write locking.
set-workarea role Changes the value of the workarea-permission-override
-permission- true|false attribute of role. A value of true enables override
override capability for role; false disables override capability
for role.

TeamSite Command-Line Tools 73


Chapter 2: Administration Tools

set-workflow role Changes the value of the


-permission- true|false workflow-permission-override attribute of role. A
override value of true enables override capability for role;
false disables override capability for role.
workarea- role Displays the value of the workarea-permission-override
permission- attribute of role.
override
workflow- role Displays the value of the
permission- workflow-permission-override attribute of role.
override

Notes
„ Depending on your system configuration, user operations are defined in one or more
of the following files:
iw-home/private/etc/userops.xml
iw-home/private/etc/userops_ui.xml
iw-home/private/etc/userops_*.xml
„ If you edit any of these files manually (as opposed to using a command-line tool
such as iwroleadm), you must run iwreset to pass the changes to the TeamSite
server.

Examples

The following command displays all possible operations that a role can be configured to
perform.
% iwroleadm all-operations

The following command creates an empty role called db_admin.


% iwroleadm create db_admin

The following command adds to the db_admin role the ability to lock and merge files.
% iwroleadm add-operations db_admin LockFile MergeFile

The following command displays the roles that db_admin can delegate.
% iwroleadm delegable-roles db_admin

The following command adds the eng_db role to the list of roles that db_admin can
delegate. This command assumes that the eng_db role already exists.
% iwroleadm add-delegable-roles db_admin eng_db

Interwoven, Inc. 74
Chapter 2: Administration Tools

iwsi
Available only if the service monitor option of TeamSite is installed. Collects TeamSite
state data about the local environment, including core and configuration files. Files
collected are not deleted from their original locations. Data is stored and compressed in
an archive file named si.timestamp in either iw-home or a specified alternate location.
The command exits after executing; it does not run as a daemon.

Man Page Group

System Services.

Usage
iwsi [-h|-v] [file]

-h Displays usage message.


-v Displays version. Has highest precedence if multiple options
are specified.
file Specifies the full directory path of an alternate archive
location. Each archive file name is given a timestamp suffix to
distinguish it from others with similar names.

Exit Status

The following exit values are returned:

0 Successful options processing.


-1 Invalid options; could not properly set the path; could not find
all the necessary binaries.
>1 Other processes returned an error.

NOTES
„ The value of timestamp in the archive file name has the format yymmdd.hhmmss.

The archive file contains the following files:


„ Message Files:
/var/adm/message
/var/adm/message.0
/var/adm/message.1
/var/adm/message.2
/var/adm/message.3
„ Log Files:
iwevents.log
iwserver.log

TeamSite Command-Line Tools 75


Chapter 2: Administration Tools

iwtrace.log
iwdeploy.log
„ Configuration Files:
iw.cfg
$IW_HOME/local/config/submit.cfg
$IW_HOME/local/config/autoprivate.cfg
„ Core Files:
$IW_HOME/core
„ Server and Process Output Files:
iwserver
informationprocessid (a file containing output from the following
commands: df, mount, uname, iwversion)

Interwoven, Inc. 76
Chapter 2: Administration Tools

iwstat
Returns current system activity and displays information about whether the Content
Store is running, frozen (with iwfreeze), flushing, out of space (disklow), or has
experienced an I/O error (diskfail). Throughput information is displayed only if the
thruputmonitoring parameter is set to on in iw.cfg (by default it is set to off). Also
displays statistics about completed operations on the TeamSite server

Man Page Group

System Information.

Usage
iwstat -h|-v
iwstat [-c] [-Gn] [-i sleep_interval] [-m] [-mm] [-mresettime]
[-mstarttime] [-mz] [-n iterations]

-h Displays usage message.


-v Displays version.
-c Displays cache statistics.
-G0 Output is tab-separated.
-G1 Output is neatly formatted (default).
-i sleep_interval Runs the command in a loop every number of seconds
specified by sleep_interval.
-m Displays statistics about completed operations on the TeamSite
server since the last time the server was started. Statistics are
displayed for each Content Store. Information includes total
number of invocations; average, minimum, and maximum
duration of each operation; percentage of total invocations that
each operation accounts for; and percentage of total invocation
time that each operation accounts for.
-mm Displays statistics about completed operations on the TeamSite
server since the last time the -mz option was issued (to reset
information gathering). Statistics are displayed for each
Content Store. Information includes total number of
invocations; average, minimum, and maximum duration of
each operation; percentage of total invocations that each
operation accounts for; and percentage of total invocation time
that each operation accounts for. If -mz was not issued since
the TeamSite server was last started, output is identical to that
of the -m option.
-mresettime Displays the time when the -mz option was last issued. If -mz
was not issued since the TeamSite server was last started,
output is identical to that of the -mstarttime option. The -mm
option returns information about completed operations on the
TeamSite server since this time.

TeamSite Command-Line Tools 77


Chapter 2: Administration Tools

-mstarttime Displays the time when information gathering on the TeamSite


server was first started during the current run of the server. The
-m option returns information about completed operations on
the TeamSite server since this time.
-mz Displays statistics about completed operations on the TeamSite
server since the last time the server was started (output is
identical to that of the -mm option), and then resets all
information gathering.
-n iterations Runs the command the number of times specified by
iterations. If -i is not also set, the interval between
iterations defaults to 1 second.

Examples

While a Submit operation is underway:

% iwstat

ID Thread User Duration Operation


0x8738 0xe1 andre 0.901 SubmitFSE 0x000021000000000002134
0x873a 0xfa chris 0.000 GetArchiveStatus

While the TeamSite server is frozen as the result of iwfreeze:


% iwstat

*** SERVER FROZEN: 55 SECONDS REMAINING ***


ID Thread User Duration Operation
0x9d 0xf root 0.000 GetArchiveStatus

The following output from iwstat was obtained while the Content Stores default and
workflow were running.
% iwstat

Store Status

defalut Running
workflow Running

ID Thread User Duration Store Operation


0x3f4e 0x17 interwoven\mroot 0.000 - GetArchiveStatus

Minutes Thruput Avg op Load


1 27 0.0189 0.51
15 14 0.0219 0.30
29 9 0.0233 0.20

The preceding example shows that in the most recent complete one-minute time
duration, the TeamSite server handled 27 operations per second. Each operation took an
average of 0.0189 seconds per operation (19 ms/operation). The average load over this

Interwoven, Inc. 78
Chapter 2: Administration Tools

one minute was 51%. By comparison, a two-cpu server is fully loaded at 200% load, a
four-cpu server is fully loaded at 400% load, and so on. Similarly, for a recent complete
15-minute duration, TeamSite handled 14 operations per second, with an average
operation time of 22 ms. Over this time, the server was occupied at 30% load.

Comparing the short and long duration figures shows the load trends. For example, a
high one-minute load, compared with a lower 60-minute load, tells you that there was a
burst of activity. You can also observe that this is not a fast server, because 27 operations
per second at 50% load is not much throughput. A fast server with fast disks can achieve
operation throughput in the 200-500 operations per second range, with operation times
in the 1-5 ms/operation range.

Finally, a load that is near or exceeds the number of CPUs on the server over a sustained
number of hours may indicate an overloaded server. It may also indicate a need to obtain
a more powerful server or a faster Content Store volume.

The following partial output from iwstat -m was obtained while the Content Stores
default and workflow were running.
% iwstat -m

Store Status
default Running
workflow Running

ID Thread User Duration Store Operation


0x11066c6 0x13f0 INT\ashanbha 0.000 - GetServerStatus

Store Operation Invocations %(Invocations) %(Time) Avg duration Min


duration Max duration

default BatchJobs 1 0.0 0.0 0.023 0.023


0.023

workflow GetRoles 6 8 39.3 0.011 0.000


0.020

TeamSite Command-Line Tools 79


Chapter 2: Administration Tools

iwstoreadm
Content Store administration involves creating, activating, and deactivating Content
Stores by using the iwstoreadm CLT. When the iwstoreadm -a storename command is
issued, the following sequence is triggered:
„ The iw.cfg file is checked to see if a store_directory_storename or
store_comment_storename entry exists. If either does, its definitions are used to
create the Content Store. If these entries do not exist, the Content Store is created as
described in the next bullet.
„ The Content Store directory is automatically created in /local/iw-store/ and
populated with a minimal Content Store containing a branch named main. The store
remains active until explicitly deactivated by using iwstoreadm -d (even if the
server is stopped and restarted).
Deactivating a store does not delete it. A store can be deactivated, moved to a new
location, and reactivated using original name (though it will be assigned a new store
ID).

Man Page Group

Content Store.

Usage
iwstoreadm [-h|-v] [-a store_name] [-d store_name] [-l]

-h Displays usage message.


-v Displays version.
-a store_name Activates an existing store, or creates and activates a new
store. You must be logged in as the root user and root must
be registered as a Master user in the file
iw-home/conf/roles/tsusers.xml to execute this option.
-d store_name Deactivates an existing store. You must be logged in as the
root user and root must be registered as a Master user in
the file iw-home/conf/roles/tsusers.xml to execute this
option.
-l Lists active stores.

Example
%iwstoreadm -l

Displays the active Content Stores:

Name Store Directory ID Comment


---- -------------- -- -------
default /local/iw-store/default 0x64
store2 /local/iw-store/store2 0x65

Interwoven, Inc. 80
Chapter 2: Administration Tools

iwtestcfg
Returns the submit filtering operation that will be performed upon a file at submission
time. For more information about submit filtering, see the TeamSite Administration
Guide.

Man Page Group

System Services.

Usage
iwtestcfg [-h|-v] vpath

-h Displays usage message.


-v Displays version.
vpath Specifies a vpath to a file or directory (see page 15).

Example
% iwtestcfg /default/main/WORKAREA/andre/cgi/test.sh

returns:
Matched area "^/default/main/WORKAREA/.*$"
Matched fse ".*\.sh$"
Actions to do are:
omask=0111

which means that TeamSite is configured to set execute permissions on the specified file
at the time that the file is submitted.

TeamSite Command-Line Tools 81


Chapter 2: Administration Tools

iwtock
Available only if the service monitor feature of TeamSite is installed. Displays
information about the TeamSite iwtock watchdog daemon and lets you specify iw-home
and Content Store locations used by iwtock.

Man Page Group

System Services.

Usage
iwtock [-h|-v|] -H iwhomedirpath -s bckstoredirpath

-h Displays usage message.


-v Displays version. Has highest precedence if multiple options
are specified.
-H iwhomedirpath Specifies the location of iw-home used by iwtock. Must be a
full directory path name.
-s bckstoredirpath Specifies the location of the Content Store used by iwtock.
Must be a full directory path name.

Exit Status

The following exit values are returned:

0 Successful options processing.


-1 Invalid options; could not properly set the path; could not find
all the necessary binaries.
>1 Other processes returned an error.
127 Exit was requested.

Example
% iwtock -H `/bin/iwgethome` -s `/bin/iwgetstore`

Interwoven, Inc. 82
Chapter 2: Administration Tools

iwuidname
Looks up the user login name corresponding to the specified UID.

Man Page Group

System Services.

Usage
iwuidname [-h|-v] uid

-h Displays usage message.


-v Displays version.
-uid Specifies the UID to look up.

Example
% iwuidname 2205

Returns:
andre

TeamSite Command-Line Tools 83


Chapter 2: Administration Tools

iwuser
Enables you to manipulate TeamSite user information.

Man Page Group

System Information.

Usage
iwuser action ident [options]

where action is one of:

-create or -c Creates a new entry.


-delete or -d Deletes an existing entry.
-modify or -m Modifies an existing entry.
-query or -q Queries an entry only (default).

where ident is one of:

[-name] nm Works with entry whose name is nm.


-id eid Works with entry whose ID is eid.
-group Entry refers to an OS group.
-loc el Works with entry whose locator is el.
-role Entry refers to a TeamSite role.
-session s Extracts user name from session string s.
-user Entry refers to an OS user (default).
-tsuser Entry refers to a non-OS TeamSite user. Only valid for query
and delete operations.

Notes for ident


„ -user and -group are mutually exclusive.
„ -session is mutually exclusive with -name and implies -user.
„ The syntax of an entry ID is T::UID: where : characters are significant. T should be
U for a user entry or G for a group. UID is a UNIX ID.

Interwoven, Inc. 84
Chapter 2: Administration Tools

Options Available for All Actions

-a Automatically creates user, group, or role if it does not already


exist.
-h Displays this help information and exit.
-v Displays version information and exit.
-D Use the local user database directly.
-F path Specifies the path of the local user database.

Options Available for Create Actions Only

-l nm[,nm...] Sets the list of aliases to nm,nm...


-g nm[,nm...] Sets the list of related groups to nm,nm...

Options Available for Modify Actions Only

-l nm[,nm...] Sets the list of aliases to nm,nm...


-la nm Adds name nm to list of aliases.
-ld nm Deletes name nm from list of aliases.
-g nm[,n...] Sets or replaces the list of related groups.
-ga nm Appends name nm to list of related groups.
-gd nm Deletes name nm from list of related groups.
-gi nm posnm Inserts nm before posnm in list of related groups.
-gp nm Prefixes name nm to list of related groups.

Notes to options for modify actions


„ -l and -g cannot be specified more than once; all others in this list may.
„ Options are processed in the order they are specified.
„ If nm contains a : then it is assumed to be an entity locator, otherwise it is treated as
a user or group name as appropriate.

TeamSite Command-Line Tools 85


Chapter 2: Administration Tools

Options Available for All Actions Except Delete

-n Suppress inheritance from relatives.


-qa Show all user/group information (default).
-qg Print names of related groups (one per line).
-qi Print entry ID.
-qn Print local name alias.
-qr nm Print RELATED if group nm is related, print UNRELATED if
not.

Notes for all actions except delete


„ One or more of these may be specified. If more than one is present, the results are
printed in the same order, separated with blank lines.
„ Queries are done after create or modify actions.

Interwoven, Inc. 86
Chapter 2: Administration Tools

iwuseradm
Add and remove TeamSite users, change user attributes, manage authentication, view
and set user roles, specify default user interfaces.

Man Page Group

System Services.

Usage
iwuseradm -h [command]|-v

iwuseradm add-user user


iwuseradm add-user user -db user_db_id

iwuseradm administrable-branches-of-user user

iwuseradm all-roles-of-user user

iwuseradm description user

iwuseradm display-name user

iwuseradm email user

iwuseradm encrypt-userdatabase-pwd [-v]

iwuseradm id user

iwuseradm list-masters

iwuseradm list-userdatabases -l|-e|-a [-v]

iwuseradm list-users -t|-o|-a|-to|-tn|-l|-lo|-ln|-e

iwuseradm master user

iwuseradm modifiable-attributes-by-db user_db_id

iwuseradm modifiable-attributes-by-user user

iwuseradm preferred-ui user

iwuseradm remove-user user

iwuseradm set-email user email

iwuseradm set-id user id

TeamSite Command-Line Tools 87


Chapter 2: Administration Tools

iwuseradm set-master user true|false

iwuseradm set-preferred-ui user ccpro|ccpro_only|ccstd|ccstd_only|none

-h command Displays iwuseradm usage information for command,


or general iwuseradm usage information if command is
omitted.
-v Displays version.
add-user user Creates a new TeamSite user named user who is an
OS user.
user -db Creates a new LDAP TeamSite user if user_db_id
user_db_id refers to an LDAP user database. Creates a new
external user if user_db_id refers to an external user
database.
administrable user Displays the administrable branches of user.
-branches-of-
user
all-roles-of- user Displays all the roles user has anywhere on the
user system.
description user Displays the value of the description attribute for
user.
display-name user Displays the value of the display-name attribute for
user.
email user Displays the value of the email attribute for user.
encrypt-userd -v Generates the encrypted version of a password for
atabase-pwd LDAP server login. If specified, -v verifies an
encrypted password. The password is passed to this
CLT through the environment variable
IWCLT_PASSWORD.
id user Displays the ID of user as defined by the tsid
attribute for non-OS users in tsusers.xml. This is the
ID used to represent a non-OS user in iwserver. Each
non-OS user must have a unique tsid setting.
list-masters Displays all master user names.
list-userdata -l Displays all LDAP servers.
bases
-e Displays all external user sources.
-a Displays all user sources.
-v Specifies verbose mode.
list-users -t Displays all TeamSite user names.
-O Displays all OS user names.
-a Displays all TeamSite user names and OS user names.
-to Displays all TeamSite OS user names.
-tn Displays all TeamSite non-OS user names.
-l Displays all TeamSite LDAP user names.

Interwoven, Inc. 88
Chapter 2: Administration Tools

-lo Displays all TeamSite LDAP OS user names.


-ln Displays all TeamSite LDAP non-OS user names.
-e Displays all TeamSite external user names.
master user Displays the value of the master attribute for user,
indicating whether user is a master user.
modifiable-at user_db_id Displays attributes that can be modified by users
tributes-by-d defined in the LDAP user database user_db_id.
b
modifiable-at user Displays attributes that can be modified by user.
tributes-by-u
ser
preferred-ui user Displays the value of the preferred-ui attribute for
user.
remove-user user Deletes user from TeamSite.
set-email user email Sets the value of the email attribute of user to the
value specified by email.
set-id user id Sets the ID of user by setting the tsid attribute in
tsusers.xml. Only applies to existing non-OS users.
The value of id is used to represent a non-OS user in
iwserver, and must be greater than or equal to the
value of nextid in tsusers.xml to ensure that each
non-OS user has a unique tsid setting.
set-master user Sets the value of the master attribute for user to true
true|false or false, which determines the master user status of
user.
set-preferred user Sets the value of the preferred-ui attribute of user to
-ui ccpro, ccpro_only, ccstd, ccstd_only, or none.
ccpro Sets the preferred-ui attribute to ccpro, which makes
ContentCenter Professional the default interface for
the user.
ccpro_only Sets the preferred-ui attribute to ccpro_only, which
limits the user’s allowed interface to ContentCenter
Professional only.
ccstd Sets the preferred-ui attribute to ccstd, which makes
ContentCenter Standard the default interface for the
user
ccstd_only Sets the preferred-ui attribute to ccstd_only, which
limits the user’s allowed interface to ContentCenter
Standard only.
none Sets the preferred-ui attribute to none.

Examples

The following command lists all TeamSite and OS users.


% iwuseradm list-users -a

TeamSite Command-Line Tools 89


Chapter 2: Administration Tools

The following command creates a TeamSite user dinesh who is also an OS user. The
password for dinesh is the same as that for his OS user account.
% iwuseradm add-user dinesh

The following command creates a TeamSite user dinesh who is not an OS user. The
password for dinesh is xyz123.
% iwuseradm add-user dinesh -n -p xyz123

The following command specifies ContentCenter Professional as the default user


interface for the user dinesh.
% iwuseradm set-preferred-ui dinesh ccpro

The following command displays whether the user dinesh is a master user.
% iwuseradm master dinesh

The following command specifies that the user dinesh is a master user.
% iwuseradm set-master dinesh true

Interwoven, Inc. 90
Chapter 2: Administration Tools

iwutildreset
Resets utility daemon configuration settings. Does not return any output when
successfully executed. For more information about the utility daemon, see the TeamSite
Administration Guide.

Man Page Group

System Services.

Usage
iwutildreset [-h host_name] [-p port_number] [-d ssl_dir]

-h host_name Configures the utility daemon to run on the specified host. If


-h is not specified, localhost is used.
-p port_number Configures the utility daemon to run on the specified port. If
-p is not specified, the default port is used (6689 unless it was
changed during installation or in iwutild.cfg).
-d ssl_dir Configures the utility daemon to use the specified secure
socket layer directory. If -d is not specified, the default SSL
directory (iw-home/local/config/ssl/iwutild_clt) is used.

TeamSite Command-Line Tools 91


Chapter 2: Administration Tools

iwutildstat
Displays active utility daemon operation statistics. For more information about the
utility daemon, see the TeamSite Administration Guide.

Man Page Group

System Services.

Usage
iwutildstat [-h host_name] [-p port_number] [-d ssl_dir] [-a]

-h host_name Displays information about the utility daemon running on the


specified host. If -h is not specified, localhost is used.
-p port_number Displays information about the utility daemon running on the
specified port. If -p is not specified, the default port is used
(6689 unless it was changed during installation or in
iwutild.cfg).
-d ssl_dir Displays information about the utility daemon using the
specified secure socket layer directory. If -d is not specified,
the default SSL directory is used.
-a Displays statistics for both active and completed operations.

Example
% iwutildstat -a

Returns:
Active operations:
ID Name Arg Duration
38 GetServerStats 0.000

Completed operations:
Name Count AvgDuration MinDuration MaxDuration
Connect 19 0.000 0.000 0.000
ExecuteCommandAsync 4 0.003 0.000 0.015
ResetConfig 2 0.007 0.000 0.015
GetServerStats 12 0.000 0.000 0.000

Interwoven, Inc. 92
Chapter 2: Administration Tools

iwversion
Returns the current TeamSite release information. It is often used as a test to see if the
TeamSite server is running. Executing iwversion makes a call to iwserver and reads
the version string from iwserver.

Man Page Group

System Information.

Usage
iwversion [-h|-v]

-h Displays usage message.


-v Displays the version string.

NOTE
When iwserver is running, iwversion displays the same result as iwserver -v.
iwversion -v displays the version string that is embedded into the iwversion CLT. If
you have installed patches, the two version strings may not be the same.

Example
% iwversion

returns:
iwserver: 6.7.0 Build 41235 Interwoven 20060328

TeamSite Command-Line Tools 93


Chapter 2: Administration Tools

Interwoven, Inc. 94
Chapter 3

Development Tools

This chapter describes the development CLTs from the following groups:
„ General Development Tools
„ Deployment Tools
„ Branch Operation Tools
„ Edition Operation Tools
„ Workarea Operation Tools
„ Version Management Tools
„ Workflow and Job Tools
„ Search and Index Tools

The CLTs are grouped and summarized in the following sections. Each CLT is then
presented in detail, arranged alphabetically.

General Development Tools


General development CLTs enable you to perform operations on, or retrieve information
about, the data in a specific file or TeamSite object. CLTs in this category are as follows:

Table 6 General development tools


CLT Description See...
iwattrib Displays metadata information about any page 105
object in the TeamSite server, including all
branches, workareas, editions, staging areas,
files, directories, and symlinks.
iwauthen Authenticates the user (by username) by page 113
checking the corresponding password.
iwckrole Checks whether a user can log in with a page 117
particular role.
iwcp Copies files. page 120
iwdecode Decodes HTML-encoded %xx lines to ASCII page 121
lines.
iwencode Encodes ASCII lines to HTML-encoded %xx page 127
lines.

TeamSite Command-Line Tools 95


Chapter 3: Development Tools

Table 6 General development tools (Continued)


iwextattr Sets extended attributes on a file. page 131
iwfilestate Displays details about a file in a TeamSite page 133
workarea, edition or staging area.
iwldapmigrate Creates a new version of tsusers.xml page 144
containing LDAP OS user information
previously stored in tsldapuserscache.xml.
Configures the LDAP server in
user_databases.xml.
iwldapsync Synchronizes information about TeamSite page 150
users from one or more LDAP servers.
Modifies entries in tsusers.xml based on
configuration settings in user_databases.xml
and information obtained from LDAP servers.
iwlist Displays a list of all subcomponents in a page 150
container. For example, iwlist displays all
servers, Content Stores, directories, editions,
workareas, and branches in a container.
iwmerge Merges files from one area into another. page 157
iwprop Manipulates TeamSite user properties. page 174
iwrename Renames a file, directory, workarea, edition, or page 183
branch.
iwvpath Displays all or parts of the version path of a page 225
specified object.

Deployment Tools
Deployment CLTs enable you to deploy a TeamSite edition to a production server. The
CLTs in this category are:

Table 7 Deployment tools


CLT Description See...
iwdelcp Automatically propagates differences between any two page 122
editions to another file system location.

Interwoven, Inc. 96
Chapter 3: Development Tools

Branch Operation Tools


Branch operation CLTs enable you to create and manipulate TeamSite branches. CLTs in
this category are as follows:

Table 8 Branch operation tools


CLT Description See...
iwmkbr Creates a new TeamSite branch. page 158
iwrmbr Deletes a TeamSite branch and all contained areas page 188
(workareas, staging areas, and editions).

Edition Operation Tools


Edition operation CLTs enable you to create and manipulate TeamSite editions. CLTs in
this category are as follows:

Table 9 Edition operation tools


CLT Description See...
iwlasted Displays the name of the last published edition on a page 143
branch.
iwnexted Displays the name that would be autogenerated for the
next edition on a branch. page 173
iwpublish Publishes the staging area. page 177
iwrmed Deletes an edition. page 189

Workarea Operation Tools


Workarea operation CLTs enable you to create and manipulate TeamSite workareas.
CLTs in this category are as follows:

Table 10 Workarea operation tools


CLT Description See...
iwevents Displays a history of submissions or updates of a page 128
workarea.
iwlistlocks Lists the locks and assignments in a workarea and its page 153
parent branch.
iwlistmod Lists all modified files and directories in a specified area. page 154
iwlock Locks any file or directory in a specified area. page 155
iwlockinfo Provides detailed information about any lock. page 156
iwmkwa Creates a new TeamSite workarea. page 159

TeamSite Command-Line Tools 97


Chapter 3: Development Tools

Table 10 Workarea operation tools (Continued)


iwprv Allows users to identify whether any file or directory in page 176
any workarea is marked private and automatically mark
any file as either private or public.
iwrmwa Deletes a TeamSite workarea. page 194
iwsubmit Submits a file, directory, or entire workarea to the page 217
staging area.
iwunlock Unlocks any file or directory. page 222
iwupdate Updates a TeamSite workarea with the version of a file page 224
or directory from another TeamSite area.

Version Management Tools


Version management CLTs return information about file revisions and versions, and
enable you to manipulate specific versions of files and directories. CLTs in this category
are as follows:

Table 11 Version management tools


CLT Description See...
iwcat Displays any version of a (text) file in TeamSite. page 116
iwcmp Compares any two TeamSite areas and displays a list page 118
of differences.
iwdiffapply Synchronizes any two file system directories. page 125
iwdiffdir Lists all incremental file system changes needed to page 126
make a directory in a workarea look like its
counterpart directory in another workarea, staging
area, or edition.
iwrcsdiff Shows the differences between two versions of a file. page 181
iwrevert Reverts to a previous version of a file. page 185
iwrlog Shows a revision log for a TeamSite file. page 186

Interwoven, Inc. 98
Chapter 3: Development Tools

Workflow and Job Tools


Workflow and job CLTs enable you to instantiate or destroy jobs, view the state of any
object in the workflow system, add files to a particular task, and otherwise interact with
running jobs. CLTs in this category are as follows:

Table 12 Workflow and job tools


CLT Description See...
iwaddtaskfile Adds a file to a job task that is part of a job page 102
instance already created on the TeamSite
server.
iwaddtaskgroup Adds groups to group tasks. page 103
iwaddtaskuser Adds users to tasks. page 104
iwcallback Tells the TeamSite server that the program page 115
corresponding to an external or cgi task is
finished. Passes a return code to the server.
iwdeltaskfile Deletes a file that is attached to a TeamSite page 124
task.
iwgeteventcomments Displays comments associated with a page 136
TeamSite workflow event.
iwgeteventfiles Displays a list of files associated with a page 137
TeamSite workflow event.
iwgettaskbyname Writes the task ID to stdout for a task page 138
specified by name.
iwgetwfobj Displays the state of any part of the server page 139
workflow subsystem in XML.
iwinvokejob Starts a job whose instance has already been page 140
created on the TeamSite server.
iwjobc Creates a job instance (based on a job page 141
specification file) on the TeamSite server.
iwjobvariable Manipulates workflow variables. page 142
iwmvtaskfile Renames a file that is attached to a TeamSite page 160
task.
iwqueryjobs Displays a list of overall job information page 178
based on a query from stdin.
iwquerytasks Displays a list of job task information based page 179
on a query from stdin.
iwretryjobop Retries submission or task update after page 184
resolution of conflicts that originally
prevented those operations.
iwrmjob Unconditionally removes an entire job page 190
instance from the TeamSite server.
iwrmtaskfile Removes a file from a job task. page 191
iwrmtaskgroup Removes groups from group tasks. page 192
iwrmtaskuser Removes users from group tasks. page 193

TeamSite Command-Line Tools 99


Chapter 3: Development Tools

Table 12 Workflow and job tools (Continued)


iwsetjobdescription Changes the description of a job. page 195
iwsetjobowner Changes the owner of a job. page 196
iwsettaskattrib Sets a new value for task attributes that have page 197
true or false values.
iwsettaskcomment Assigns a comment to a TeamSite task. page 198
iwsettaskdescription Assigns a description to a TeamSite task. page 199
iwsettaskfilecomment Assigns a comment to a file associated with page 200
a TeamSite task.
iwsettaskownerandarea Assigns an owner and workarea to a page 201
TeamSite task.
iwsettasktimeout Changes the timeout value on an inactive page 202
task that already has a timeout.
iwtaketask Assigns a shared task to a single user. page 218
iwtaskselect Marks a usertask finished and selects a page 219
successor task.
iwtaskvariable Creates, deletes, sets, and retrieves values of page 220
variables on a TeamSite task.
iwundochoice Reverses a user-chosen transition from a user page 221
task or group task.
iwuntaketask Removes the ownership of an active group
task. page 223

Search and Index Tools


Search and index CLTs enable you to administer the search manager and index manager,
control indexing operations on a per-branch basis, and perform various search
operations (including queries).

NOTE
Within CLTs and examples, you may find references to index server or search server.
These terms are used interchangeably with index manager and search manager,
respectively.

Interwoven, Inc. 100


Chapter 3: Development Tools

CLTs in this category are as follows:

Table 13 Search and index tools


CLT Description See...
iwldapsearch Queries an LDAP directory. Also reports page 146
configuration information from iw.cfg on
TeamSite systems.
iwndxaddbr Adds a branch to be indexed. page 161
iwndxfreezebr Freezes or unfreezes the indexing of a branch. page 162
iwndxlistbr Displays a list of indexed branches. page 163
iwndxmgrfreeze Freezes or unfreezes the index manager. page 164
iwndxmgrstatus Displays the current status of the index manager. page 165
iwndxmgrstop Shuts down the index manager. page 166
iwndxpurgebr Deletes the index collections associated with a page 167
branch.
iwndxrefreshbr Reindexes a branch by putting it in the bulk or page 168
incremental queue.
iwndxrmbr Removes indexing information for an indexed page 169
branch.
iwndxstatus Displays the current index status for a list of page 170
specified branches from the index manager.
iwndxwamodificationsbr Enables or disables the indexing of workareas of page 172
a specified branch (which is indexed by the
index server).
iwsrchattrib Displays a list of indexed extended attributes or page 203
templating attributes.
iwsrchgethome Displays the location of the search home page 206
directory.
iwsrchgetpage Displays the results page of a search query. page 207
iwsrchmgrping Pings the search manager. page 209
iwsrchmgrstop Shuts down the search manager. page 210
iwsrchndxstatus Displays the current index status for a list of page 211
specified branches from the search manager.
iwsrchndxstatuschg Instructs the search manager to get the latest page 213
status of all indexed branches from the index
manager.
iwsrchquery Queries the search manager. page 214

TeamSite Command-Line Tools 101


Chapter 3: Development Tools

iwaddtaskfile
Adds a file to a specified task in an instantiated job.

Man Page Group

Workflow/Job.

Usage
iwaddtaskfile [-h|-v] [-s servername] taskID path+ comment

-h Displays usage message.


-v Displays version.
-s servername Specifies the server on which the job is instantiated. Server
names can be specified by name or IP address.
taskID Specifies the task to which the file will be added. Task IDs are
represented as integers.
path Path, including name of the file to add, relative to area root.
comment Comment attached to the file.

Example

The following command adds the file /default/main/WORKAREA/eng/content.txt to


job 7734 on the server production.example.com (assuming the command is issued
from the eng directory):
% iwaddtaskfile -s production.example.com 7734 content.txt “This needs to
be reviewed”

Interwoven, Inc. 102


Chapter 3: Development Tools

iwaddtaskgroup
Adds groups to group tasks.

Man Page Group

Workflow/Job.

Usage
iwaddtaskgroup [-h] [-v] [-s servername] taskID group

-h Print this message.


-v Print version.
-s servername Use servername as TeamSite server.
taskID ID of task to change.
group OS or TeamSite group to share task.

Example
% iwaddtaskgroup 343 graphics

TeamSite Command-Line Tools 103


Chapter 3: Development Tools

iwaddtaskuser
Adds users to tasks.

Man Page Group

Workflow/Job.

Usage
iwaddtaskuser [-h] [-v] [-s servername] taskID user

-h Print this message.


-v Print version.
-s servername Use servername as TeamSite server.
taskID ID of task to change.
user User to share task.

Example
% iwaddtaskuser -s eaglesmith 105 fred

Interwoven, Inc. 104


Chapter 3: Development Tools

iwattrib
Displays metadata information about any object in the TeamSite server, including all
branches, workareas, editions, staging areas, files, directories, and symlinks.

Man Page Group

General Development.

Usage

To return information on a specific attribute of an object:


iwattrib objectvpath attribute
iwattrib -o objid [containervpath] attribute

To list available attributes for an object:


iwattrib -l objectvpath
iwattrib -l -o objid [containervpath]

-h Displays usage message.


-v Displays version.
objectvpath Vpath of the object (see page 15).
containervpath Vpath of the content store that contains the objid (Note: the
containervpath must start with /). Defaults to the store named
default.
-o objid Object ID of the object.
attribute Attribute to return information about.
-l Lists the attributes available for the specified object.

One possible returned attribute is flags. Typical returned iwattrib -o flag values
would look similar to:
„ 0x00010000—directory

„ 0x00100000—symlink

„ 0x00000002—deleted

„ 0x00040000—private

The iwattrib CLT can also return a value that is the result of a bitwise OR operation.
For example, for a file that is a directory and private, iwattrib returns the value:
0x00050000

which is the result of 0x0001000 | 0x0004000.

TeamSite Command-Line Tools 105


Chapter 3: Development Tools

For a file that is a private XML document, iwattrib returns:


0x00440000

which is the result of 0x0040000 | 0x0004000.

Examples
% iwattrib -l main

returns the names of all the attributes available for the main branch:
cid
objid
crdate
creator
owner
group
name
label
moddate
busy
rootedition
firstedition
lastedition
parentbranch
archive
branchcount
editioncount
workareacount
% iwattrib main objid

returns the objid of the main branch:


0x00002250
% iwattrib main archive

returns the objid of the TeamSite archive containing the main branch:
0x000020200000000000000064

The values of attribute available for each type of object are:

Interwoven, Inc. 106


Chapter 3: Development Tools

Server

Table 14 Server attribute values


Name Example Description
cid 0x00000051 Class ID
objid 0x0000000000000000000000a Object ID
crdate Thu Aug 24 13:13:30 2004 Creation date
creator smtp Uid of the creator
owner smtp Uid of the owner
group root Gid of the group for sharing
name IWSERVER Name
hostname chocolate Host name of the TeamSite server
ipaddress 0.0.0.0 IP address of the TeamSite server
verstring iwserver: 6.5.0 Build Version of TeamSite running on the
42325 Interwoven 200713 TeamSite server

Archive

Table 15 Archive attribute values


Name Example Description
cid 0x00002020 Class ID
objid 0x00002025 Object ID
name default Name
label Default archive Comment attached at time of
creation
storage_path C:\Interwoven\Teamsite\iw- Path to the location of the Content
store Store
comment Marketing content. Description comment for the store

Branch

Table 16 Branch attribute values


Name Example Description
cid 0x00002250 Class ID
objid 0x00002250000000000000006d Object ID
crdate Tue Aug 22 18:11:41 2004 Creation date
creator andre Uid of the creator
owner andre Uid of the owner
group marketing Gid of the group for sharing
name dev Name

TeamSite Command-Line Tools 107


Chapter 3: Development Tools

Table 16 Branch attribute values (Continued)


Name Example Description
label Main branch Comment attached at time of
creation
lockmodel submitlock The locking model chosen for the
branch
moddate Tue Aug 22 18:11:41 2004 Date modified
busy TRUE or FALSE Tells whether the branch is busy or
not
rootedition 0x000020100000000000000077 Object ID of the edition that the
or INITIAL branch is based on (-n returns the
name of the edition)
firstedition 0x00002010000000000000051e Object ID of the first edition on the
or INITIAL branch (-n returns the name of the
edition)
lastedition 0x000020100000000000000722 Object ID of the latest edition on the
or ed_0001 branch (-n returns the name of the
edition)
parentbranch 0x00002250000000000000006d Object ID of the parent branch (-n
or main returns the name of the branch)
archive 0x000020200000000000000001 Object ID of the archive (-n returns
or default the name of the archive)
branchcount 1 Number of subbranches present on
the branch (does not recurse to
sub-sub branches)
editioncount 2 Number of editions on the branch
workareacount 4 Number of workareas on the branch

Edition

Table 17 Edition attribute values


Name Example Description
cid 0x00002010 Class ID
objid 0x000020100000000000000722 Object ID
crdate Mon Aug 28 13:45:57 2004 Creation date
creator andre Uid of the creator
owner andre Uid of the owner
group marketing Gid of the group for sharing
name ed_0001 Name
label baseline edition Comment attached at time of creation
busy TRUE or FALSE Tells whether the edition is busy or not

Interwoven, Inc. 108


Chapter 3: Development Tools

Table 17 Edition attribute values (Continued)


Name Example Description
rootdir 0x000010080000011a00000121 Object ID of the root directory of the
or / edition (-n returns the name of the
directory)
nextedition 0x000020100000000000000722 Object ID of the edition after the
or ed_0002 specified edition (-n returns the name
of the edition)
prevedition 0x00002010000000000000051e Object ID of the edition before
or INITIAL the specified edition (-n returns the
name of the edition)
publishdate Mon Aug 28 13:45:57 2004 The date on which the edition was
published
branch 0x000022500000000000000514 Object ID of the edition’s branch (-n
or dev returns the name of the branch)
sequenceno 1 Sequence number

Workarea

Table 18 Workarea attribute values


Name Example Description
cid 0x02100 Class ID
objid 0x000021000000000000000522 Object ID
crdate Thu Aug 24 13:13:30 2004 Creation date
creator andre Uid of the creator
owner andre Uid of the owner
group marketing Gid of the group for sharing
name andre Name
label Andre’s workarea Comment attached at time of creation
moddate Thu Aug 24 13:13:30 2004 Date modified
modified TRUE or FALSE Tells whether the object has been
modified or not
busy TRUE or FALSE Tells whether the workarea is busy or
not
rootdir 0x000005220000000000000520 Object ID of the root directory of the
or / workarea (-n returns the name of the
directory)
baseedition 0x00002010000000000000051e Object ID of the edition that the
or INITIAL workarea is based on (-n returns the
name of the edition)
branch 0x000022500000000000000514 Object ID of the workarea’s branch (-n
or dev returns the name of the branch)

TeamSite Command-Line Tools 109


Chapter 3: Development Tools

Submit Event

Table 19 Submit event attribute values


Name Example Description
cid 0x00002258 Class ID
edition 0x000020100000000000000140 Object ID of the edition associated with
the submit event
objid 0x0000225800000000000006bb Object ID of the submit event
workarea 0x000021000000000000000522 Object ID of the submitting workarea
submitter andre Uid of the user who submitted
sdate Mon Aug 28 13:45:43 2004 Date of submission
entries 5 Number of files and directories
submitted
submit_cmt first submit to staging Submit-level comment
area
submit_info keyword Info field

Update Event

Table 20 Update event attribute values


Name Example Description
cid 0x0000225a Class ID
objid 0x0000225a0000000000000a9a Object ID of the update event
workarea 0x000021000000000000000522 Object ID of the updated workarea
updater andre Uid of the user who updated the
workarea
udate Mon Oct 2 16:57:12 2004 Date the workarea was updated
entries 59 Number of files and directories updated

Staging Area

Table 21 Staging area attribute values


Name Example Description
cid 0x00002255 Class ID
objid 0x000022550000000000000521 Object ID
crdate Thu Aug 24 13:13:06 2004 Creation date
creator andre Uid of the creator
owner andre Uid of the owner
group marketing Gid of the group for sharing
name STAGING Name

Interwoven, Inc. 110


Chapter 3: Development Tools

Table 21 Staging area attribute values (Continued)


Name Example Description
label Comment attached at time of creation
moddate Thu Aug 24 13:13:06 2004 Date modified
modified TRUE or FALSE Tells whether the object has been
modified
busy TRUE or FALSE Tells whether the staging area is busy
rootdir 0x000005210000000000000520 Object ID of the root directory of the
or / staging area (-n returns the name of the
directory)
branch 0x000022500000000000000514 Object ID of the staging area’s branch
or dev (-n returns the name of the branch)

File and Directory

Table 22 File and directory attribute values


Name Example Description
cid 0x00001008 Class ID
objid 0x0000100842263b2340000005 Object ID
crdate Fri Sep 1 15:55:51 2004 Creation date
creator andre Uid of the creator
owner andre Uid of the owner
group marketing Gid of the group for sharing
name index.html Name of the file or directory
label first submit Latest comment attached
moddate Fri Sep 1 16:24:13 2004 Date modified
modified TRUE or FALSE Tells whether the object has been
modified
currdirectory 0x00001008422615e240000001 Object ID of the directory
containing the specified item (-n
returns the name of the directory)
area 0x000021000000000000000522 Object ID of the area containing the
specified item (-n returns the name
of the area)
areacid 0x00002100 Class ID of the area containing the
specified item
branch 0x000022500000000000000514 Object ID of the branch containing
the specified item (-n returns the
name of the branch)
archive 0x000020200000000000000001 Object ID of the archive containing
the specified item (-n returns the
name of the archive)
flags 0x00080000 Additional file information

TeamSite Command-Line Tools 111


Chapter 3: Development Tools

Table 22 File and directory attribute values (Continued)


Name Example Description
size 1949 Size of the file or directory (in
bytes)
lastuser andre User who last modified the file
istagged TRUE or FALSE True if the file is locked
nfsmode 0x000001ff NFS permission bits
isdir TRUE or FALSE TRUE if the specified item is a
directory, FALSE if it is not
taglabel Locked by launching edit Comment attached to tag (for
example, a lock or assignment)
revisionnumber 3 Ordinal representing the version of
the file submitted on a branch
revisionbranch 0x000022500000000000000514 Object ID of the branch on which
this version of the file has been
submitted
submitevent 0x000022580000000000000ab8 Object ID of the submit event for
the most recent submission of this
file
history first submit Comments associated with file at
time of submission (includes both
submission comment and individual
file comment)
prevversion 0x0000052100000aea00000815 Object ID of the previous version
permissions interwoven\user1:Full Permissions for the file or directory
Control
(All),INTERWOVEN\Domain
Users:Special Access
(RWX),Everyone:Special
Access (RWX)
attrmoddate Fri Sep 1 15:55:51 2004 Timestamp when a file or directory
attribute was modified
fsmoddate Fri Sep 1 15:55:51 2004 Timestamp when file system was
modified

Interwoven, Inc. 112


Chapter 3: Development Tools

iwauthen
Authenticates the user (by username) by checking the corresponding password. To
prevent the password from being displayed on the command line, the password is passed
to this CLT by the environment variable IWCLT_PASSWORD.

Man Page Group

General Development

Usage
iwauthen [-c|-d domain|-h|-v] user

-c Only checks if the username exists (does not use the password
for authentication).
-d domain Specifies the domain against which to authenticate the user
(when logging in to TeamSite on Windows servers).
-h Displays usage message.
-v Displays version.
user Specifies the user to authenticate.

Examples
% iwauthen bgunn

Returns:
„ 0 and prints YES if the password is correct.
„ 1 and prints NO if the password is not correct.
„ Returns a number greater than 1 if an error occurred while authenticating.

% iwauthen -c nyoung

Returns:
„ 0 and prints YES if the username exists.
„ 1 and prints NO if the username does not exist.
„ Returns a number greater than 1 if an error occurred while checking.

Notes

The iwauthen CLT is often used in conjunction with the iwckrole CLT as described in
the following scenario:

TeamSite Command-Line Tools 113


Chapter 3: Development Tools

After installing TeamSite, a user cannot log into TeamSite. To find out why:
1. Run iwckrole.
The results will confirm whether or not the user is configured with the role with
which he or she is trying to log in. If iwckrole fails, there is a problem with the
user’s role, otherwise, continue to step 2.
2. Run iwauthen -c username to determine if the user is known to the system.
If it fails, then the user account is missing, otherwise, continue to step 3.
3. Run iwauthen username.
If it fails, the password being used for authentication is wrong.

For detailed information about the iwckrole CLT, see page 117.

Interwoven, Inc. 114


Chapter 3: Development Tools

iwcallback
Notifies the server that the program corresponding to an <externaltask/> or
<cgitask/> is finished and passes the server a return code.

Man Page Group

Workflow/Job.

Usage
iwcallback [-h|-v] [-s servername] taskID returnCode [comment]

-h Displays usage message.


-v Displays version.
-s servername Specifies the server on which the job is instantiated. Server
names can be specified by name or IP address.
taskID Specifies the task to which the file will be added. Task IDs are
represented as integers.
returnCode Specifies the notification given to the server upon program
completion. Represented as an integer from 0 to n.
comment An optional comment.

Example

The following command sends the return code 2 to the server production.example.com
when the program named in task 7734 finishes running:

% iwcallback -s production.example.com 7734 2

TeamSite Command-Line Tools 115


Chapter 3: Development Tools

iwcat
iwcat is cat for TeamSite files. If you specify a vpath to the file, you will see the
current version of the file in the area you specify. You can view any previous version of
a file by specifying the objid for that version.

Man Page Group

Version Management.

Usage
iwcat [-h|-v] filevpath
iwcat -o fileobjid directoryvpath

-h Displays usage message.


-v Displays version.
filevpath Vpath of the file to display (used to display the current version in
an area) (see page 15).
-o fileobjid Objid of the file to display (used to display any version).
directoryvpath Location of the file object.

Examples
% iwcat main/WORKAREA/andre/htdocs/about2.html

displays the version of about2.html in workarea andre.

% iwcat -o 0x0000007b0000007d000000bb main/STAGING

displays the version of the file that has the objid 0x0000007b0000007d000000bb (in this
case, the second most recent version of about2.html). directoryvpath can point to any
area containing the file.

Interwoven, Inc. 116


Chapter 3: Development Tools

iwckrole
Checks whether the specified user has the specified role.

Man Page Group

General Development.

Usage
iwckrole [-h|-v] role user

-h Displays usage message.


-v Displays version.
role author, editor, admin or master.
user Username of the person whose role you are checking.

Exits with 0 on successful authorization, non-zero on failure.

Example
% iwckrole admin andre

Returns:
YES

TeamSite Command-Line Tools 117


Chapter 3: Development Tools

iwcmp
Compares any two TeamSite areas and reports an exhaustive list of all modifications.

Man Page Group

Version Management.

Usage
iwcmp [-h|-v][-z] area1vpath area2vpath

-h Displays usage message.


-v Displays version.
-z Include submitted deletion/null comparisons and submitted
deletion/submitted deletion comparisons.
area1vpath Vpath of area1 (see page 15).
area2vpath Vpath of area2 (see page 15).

The output is in the form:


status-in-area1 status-in-area2 path-to-file-or-directory

where status is indicated by a combination of the following symbols:

- File or directory does not exist in this area.


f File exists.
d Directory exists.
s Symlink exists.
+ Item has been modified.
x File or directory has been deleted.
p File or directory is marked private.

Example
%iwcmp main/branch1/WORKAREA/wa1 main/branch1/WORKAREA/wa2

Returns:
x+ f htdocs/about.html
f+ - htdocs/about2.html
d+ - htdocs/support/
f+ - htdocs/main.html
f fp+ htdocs/products.html

showing that the file about.html has been renamed to about2.html in the first area, so
about.html appears as deleted and about2.html appears as new in the first workarea. A

Interwoven, Inc. 118


Chapter 3: Development Tools

directory named support has been created in the first area and does not exist in the
second. The file main.html only exists in the first area specified and has never existed
in the second area, and the file products.html exists in both areas, but in the second
area it has been marked private and modified.

TeamSite Command-Line Tools 119


Chapter 3: Development Tools

iwcp
Copies files from one location to another.

The iwcp CLT is different from iwupdate in that a file’s version history from the source
is not propagated to the destination. A new (modified) file is created regardless of the
source. Extended Attributes are preserved.

Man Page Group

General Development.

Usage
iwcp [-h] [-v] [-r [-k]] [-s] src dst

-h Displays usage message.


-v Displays version.
-r Copy directories recursively.
-k Keep going when some files cannot be copied.
-s preserve symlinks while copying.
src File to be copied.
dest Destination for the file to be copied. Must be within a
workarea.

The source and destination can use a relative path (such as file_name) or an absolute
vpath (such as /default/main/WORKAREA/wa/file_name). Both source and destination
must be on the same store.

Example

Using absolute vpaths:


iwcp -r /myStore/main/WORKAREA/wa1/dir1 /myStore/main/WORKAREA/wa2

Using relative vpath of /iwmnt/default/myStore/WORKAREA/wa1/:


iwcp –r dir1 main/WORKAREA/wa2

Copy a specific directory from an edition to a workarea:


iwcp -r main/EDITION/ed_0001/dir main/myBranch/WORKAREA/wa1

Interwoven, Inc. 120


Chapter 3: Development Tools

iwdecode
Decodes HTML-encoded %xx lines to ASCII lines. Receives HTML-encoded lines
through stdin.

Man Page Group

General Development.

Usage
iwdecode [-h|-v]

-h Displays usage message.


-v Displays version.

Example
% iwdecode
Locked%20by%20launching%20edit
^D

Returns:
Locked by launching edit

TeamSite Command-Line Tools 121


Chapter 3: Development Tools

iwdelcp
Allows users to automatically propagate differences between any two editions to
another file system location. This is a global operation that migrates all file changes and
can be used as a simple deployment mechanism when users do not require the flexibility
of TeamSite OpenDeploy.

iwdelcp copies changed files from a specified edition to a deployment directory (which
must be accessible via a file system). The resulting target directory will have the exact
same content as the deployed edition. iwdelcp only copies files that have changed since
the last time an edition was deployed to the same location. It keeps track of which
edition it deployed last by creating a file in the target directory called .IWDELCP.

NOTE
No concurrency control is enforced—if two copies of iwdelcp are run simultaneously
on the same target directory, the result could be incorrect.

Man Page Group

Deployment.

Usage
iwdelcp [Flags] editionvpath srcdir targetdirpath

Interwoven, Inc. 122


Chapter 3: Development Tools

Flags

-c oldedname Edition name of previous edition on the same branch as edvpath.


If -c is not specified, targetdirpath/.IWDELCP is used to
determine which edition (if any) was previously deployed to
targetdirpath.
-f Use ftp (instead of rsh) for remote access. Symbolic links are
ignored when in ftp mode.
-r Use rsh (instead of ftp) for remote access (default option for
remote copying).
-m chmod so that only the current user has write access to the files
being copies (not available with ftp).
-o changelist changelist is an output file which lists the changes being
pushed to the target directory.
editionvpath Vpath of the edition to be deployed (vpath must be for an edition)
(see page 15).
srcdir Subdirectory of edvpath to deploy to targetdirpath.
targetdirpath File system directory to deploy to; can be prefixed with a
hostname (for example, host:/targetdirpath).
-h Displays usage message.
-v Displays version.

Example
% iwdelcp main/br1/EDITION/ed_05 /assets /usr/local/etc/httpd
/htdocs/assets

copies the changed files in main/br1/EDITION/ed_05/assets to


/usr/local/etc/httpd/htdocs/assets.

TeamSite Command-Line Tools 123


Chapter 3: Development Tools

iwdeltaskfile
Deletes the file that is attached to a TeamSite task and updates the task by removing the
reference to that file. To remove only the file reference from the task (without deleting
the file), use the iwrmtaskfile CLT (page 191).

Man Page Group

Workflow/Job.

Usage
iwdeltaskfile [-h] [-v] [-s servername] taskid path

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
taskID ID of the task.
path Area relative path to delete from task and TeamSite.

Example
% iwdeltaskfile 1200 content/images/goingGoingGone.gif

where 1200 is the task ID and content/images/goingGoingGone.gif is a file to be


deleted from TeamSite.

Interwoven, Inc. 124


Chapter 3: Development Tools

iwdiffapply
Automatically synchronizes any two file system directories. iwdiffapply applies the
difference list generated by iwdiffdir to updatedir, referencing refdir.

Man Page Group

Version Management.

Usage
iwdiffapply [-h|-v] [-f difflistfile] updatedir refdir

-h Displays usage message.


-v Displays version.
-f difflistfile File containing the difference list.
updatedir Directory to be updated (specify using a directory path: see
page 17).
refdir Reference directory (specify using a directory path: see page 17).

NOTE
After iwdiffapply has been run, updatedir is changed and refdir is unchanged.

If the difflistfile is not specified, it is assumed that the difference list is coming in
from stdin. The difference list is in the format:

m modified file
s new symbolic link
f new file
d new directory
x deleted file or directory

Example
% iwdiffapply -f difflist /iwmnt/default/main/WORKAREA/chris/htdocs
/iwmnt/default/main/WORKAREA/andre/htdocs

modifies the /htdocs directory in workarea chris to look like the /htdocs directory in
workarea andre.

TeamSite Command-Line Tools 125


Chapter 3: Development Tools

iwdiffdir
Provides a list of all incremental file system changes needed to make a directory from a
workarea look like its counterpart directory in another workarea, edition, or staging
area. Creates a difference list which tells you how to modify updatedir to make it look
like refdir. This list can be used to modify the directory with iwdiffapply.

Man Page Group

Version Management.

Usage
iwdiffdir [-h|-v] updatedir refdir

-h Displays usage message.


-v Displays version.
updatedir Directory path of the directory to be updated (see page 17).
refdir Directory path of the reference directory (see page 17).

Each entry in the difference list is preceded by one of the following keys:

m Modified file or link.


s New symbolic link.
f New file.
d New directory.
x Deleted file or directory.

Example
% iwdiffdir /iwmnt/default/main/WORKAREA/andre/htdocs
/iwmnt/default/main/WORKAREA/chris/htdocs

Returns:
m about2.html
f banner.gif
d support
x logo.gif

meaning that in order for the /htdocs directory in workarea andre to look like the
/htdocs directory in workarea chris, about2.html must be modified, banner.gif must
be added, the support directory must be added, and logo.gif must be deleted.

Interwoven, Inc. 126


Chapter 3: Development Tools

iwencode
Encodes ASCII lines to HTML-encoded %xx lines. Takes input from stdin.

Man Page Group

General Development.

Usage
iwencode [-h|-v]

-h Displays usage message.


-v Displays version.

Example
% iwencode
Locked by launching edit
^D

Returns:
Locked%20by%20launching%20edit

TeamSite Command-Line Tools 127


Chapter 3: Development Tools

iwevents
Displays a history of submissions or updates of a workarea, staging area, or edition.

Man Page Group

Workarea Operation.

Usage
iwevents [-h|-v] -s[ubmit]|-u[pdate] [-n[oheader]] [-i[ds]] [-a] vpath
latest|all

iwevents [-n[oheader]] id [store]

-h Displays usage message.


-v Displays version.
-s Gets a history of Submit operations.
-u Gets a history of update operations for a workarea.
-n Specifies not to generate header line.
-i Displays only the objids of the Submit or Get Latest events.
-a Excludes submit entries of anonymous editions with the
specified edition or staging area. Applicable only if all is
specified and vpath refers to an edition or staging area.
vpath Specifies a vpath to a workarea, edition, or staging area (see
page 15).
latest Gets only the latest submit or update.
all Gets all currently logged submits or updates.
id Specifies the objid for the event.
store Name of the backing store that contains the object; defaults to the
store named default.

When -s is specified, each entry has the following fields:

TIME time of submission


UPDATE type of update: ADD, MODIFY, DELETE, FORCEDELETE, or
FORCEMODIFY
TYPE DIRECTORY or FILE
PATH path of the file or directory submitted
USER user who submitted the file or directory
COMMENT comment attached to the file at time of submission
APPROVE TRUE or FALSE
EVENTID objid of the submit event

Interwoven, Inc. 128


Chapter 3: Development Tools

FILEID objid of the file


WORKAREAID objid of the workarea
REVISION Revision string of the file

When -u is specified, each entry will have the following fields:

TIME time of update


UPDATE type of update: ADD, MODIFY, DELETE
TYPE DIRECTORY or FILE
PATH path of the file or directory updated
USER user who performed the update
EVENTID objid of the update event
FILEID objid of the file
SOURCEAREAID objid of the area files were updated from
REVISION

Examples
% iwevents -s main/WORKAREA/andre all

Returns a history of all the submissions from workarea “andre” and includes the headers
for each entry:
TIME UPDATE TYPE PATH USER COMMENT
APPROVE EVENTID FILEID
WORKAREAID REVISION

[Fri Apr 21 11:49:13 2004] ADD DIRECTORY /htdocs/ andre <none>


FALSE 0x0001025800000000000000e2 0x0000007a00000079000000e3
0x00010100000000000000007b /main/1

[Fri Apr 21 11:59:37 2004] ADD FILE /htdocs/CorpGuide2.pdf andre <none>


FALSE 0x00010258000000000000011f 0x0000007b000000e400000117
0x00010100000000000000007b /main/1

[Fri Apr 21 11:59:37 2004] ADD FILE /htdocs/logo.PSD andre <none>


FALSE 0x00010258000000000000011f 0x0000007b000000e400000119
0x00010100000000000000007b /main/1
% iwevents -s -n main/WORKAREA/andre latest

Returns only the files submitted in the most recent Submit operation and strips the
headers:
[Fri Apr 21 11:59:37 2004] ADD FILE /htdocs/CorpGuide2.pdf andre <none>
FALSE 0x00010258000000000000011f 0x0000007b000000e400000117
x00010100000000000000007b

[Fri Apr 21 11:59:37 2004] ADD FILE /htdocs/logo.PSD andre <none>

TeamSite Command-Line Tools 129


Chapter 3: Development Tools

FALSE 0x00010258000000000000011f 0x0000007b000000e400000119


0x00010100000000000000007b
% iwevents -u main/WORKAREA/andre all

displays a list of all files copied in to the workarea during all Get Latest operations and
includes the headers:
TIME UPDATE TYPE PATH USER
EVENTID FILEID
SOURCEAREAID

[Fri Apr 21 13:34:30 2004] MODIFY FILE /htdocs/index.html andre


0x0001025a000000000000013b 0x000001300000007d00000136
0x00010256000000000000007a

Interwoven, Inc. 130


Chapter 3: Development Tools

iwextattr
Enables you to set, delete, and look up extended attributes of a file or directory. The file
or directory is specified with a vpath, including the server name. Extended attributes can
use any naming scheme, but one common method is to name attributes by general class,
then by their specific description. For example:

description/language=English
description/keywords=marketing, software, enterprise

The attributes mentioned above both fall into the descriptive category, but one stores
language information and the other stores keywords. You might also have attributes that
describe the file’s relationships to other files, such as its document of origin or the files
it links to, for example:
/relationships/source
/relationships/links/outbound
/description/keywords
/description/language

Man Page Group

General Development.

Usage
iwextattr [-h|-v] [-s attribute=value|-g attribute|-d attribute|-l]
[-f] [-u] [-c] [-e] [-r regex] [-x] vpath

-h Displays usage message.


-v Displays version.
-s attribute=value Sets attribute to value.
-s attribute Sets attribute by reading a value from
stdin.
-g attribute Gets the value of attribute.
-d attribute Deletes attribute.
-l Lists attributes and values.
-f Reads/writes attribute value from
stdin/stout for -s and -g options.
-u UTF8 encode extended attribute values on
input, and decode on output.
-c Clears (deletes) all extended attributes for the
specified file.
-e Enumerates attribute names.
-r regex Uses regex to filter attribute names (requires
-l or -e).

TeamSite Command-Line Tools 131


Chapter 3: Development Tools

-x Reads and writes XML with -s and -l


options.
vpath Full path to a file. Uses the form:
[//server]/archive{[/branch]+}
/{EDITION,WORKAREA}/dirpath

If no option is specified, attributes are listed as with -l.

When attribute values are printed, unprintable (non-ASCII) characters are outputted as *.

Examples

% iwextattr -s /description/language=English
//IWSERVER/default/main/dev/WORKAREA/andre/products/index.html

sets the /description/language attribute on the file products/index.html in


workarea andre.

% iwextattr -l
//IWSERVER/default/main/dev/WORKAREA/andre/products/index.html

Displays a list of all the attributes on products/index.html, for example:


/relationships/source=products.doc
/relationships/links/outbound=/test.html;/mktg/index.html;/eng/index.html

/description/keywords=marketing,software,enterprise
/description/description=Overview of our suite of examples
/description/launch_date=March 19th, 1999
/description/expire_date=May 21st, 1999
/description/language=English
/description/contributors=Bob, Jerry, Phil
/description/audience=Marketing

% iwextattr -g /description/language
//IWSERVER/default/main/dev/WORKAREA/andre/products/index.html

Returns the value of the /description/language attribute on products/index.html,


for example:
English

Interwoven, Inc. 132


Chapter 3: Development Tools

iwfilestate
Displays state information about a file in a TeamSite workarea (it also works for files in
an edition or staging).

NOTE
Unlike most CLTs, iwfilestate must be issued on the TeamSite server host.

Man Page Group

General Development.

Usage

iwfilestate [-h|-v] [-f format] vpath [vpath...]

-h Displays help information.


-v Displays version information.
-f format Specifies output format. Where format is either:
• text. Human-readable text output (default)
• script. Terse text output, suitable for parsing
-i Includes user information in output (primarily for use with the
-session option).
vpath Full path to a file (multiple vpaths are supported). Uses the form:
/archive{[/branch]+}
/{EDITION,STAGING,WORKAREA}/dirpath

Example
% iwfilestate -f text /dev/main/dev/WORKAREA/bgunn/Makefile

Returns:
/dev/main/dev/WORKAREA/bgunn/Makefile
Conflict: No
Current: Yes
Modified: No
Editable: Yes
Not locked
Not assigned

If the script format is specified (instead of text), it would return the following:
conflict=no
current=yes
modified=no
editable=yes
locked=no
assigned=no

TeamSite Command-Line Tools 133


Chapter 3: Development Tools

While the information returned for the text and script formats are the similar, the
script format is easier for CGIs and other programs to parse.

Notes
„ The conflict item states whether the file is in conflict with the staging area.
If vpath specifies a file in an edition or staging area, conflict is always no. It is
also no for workarea files that are not in conflict with the corresponding file in the
staging area. However, if a file has been modified in the workarea and a new version
was submitted to the staging area since the last Get Latest operation in the workarea,
then a conflict exists and the conflict item will be yes.
„ The current item states whether a file in a workarea is the same as the version in
the staging area.
If vpath specifies a file in a workarea and a more recent version of the file has been
submitted to the staging area since the last time a Get Latest operation was done in
the workarea, then current will be no. In all other cases, including files in an
edition or the staging area, current will be yes.
You can think of current as stating whether or not Get Latest will bring a more
recent version of the file into the workarea.
„ The modified item is yes for a file in a workarea that has been modified in some
way and is therefore eligible for Submit. It is no for files in a workarea that have not
been modified since the last Get Latest operation (and also for all files in editions or
staging areas).
„ The editable item states if the Edit functionality (buttons or menu items) for a file
is activated in the TeamSite GUI. It is yes if all of the following conditions have
been met:
‰ The file is in a workarea
‰ The user is allowed to modify the workarea
‰ The user is allowed to write to the file
‰ The file is not locked by another user or in a different workarea
Unless:
‰ The Submit Locking model is in use for the branch, and:
‰ The user’s role is not Author
„ The locked item states whether or not a file in a workarea has been locked in that
workarea’s branch. It is always no for files in editions or staging areas.
‰ If the file is locked by the user invoking iwfilestate, the script format
returns:
locked=self

and the text format returns:


Locked by self

Interwoven, Inc. 134


Chapter 3: Development Tools

‰ If the file is locked by a user other than the user invoking iwfilestate, the
script format returns:
locked=yes
owner=user_who_locked_the_file
workarea=name_of_workarea_that_holds_the_lock
and the text format returns:
Locked by user username in workarea workareaname

„ The assigned item is always no or Not Assigned (this item is not used currently
and will be removed in a future release).

TeamSite Command-Line Tools 135


Chapter 3: Development Tools

iwgeteventcomments
Displays comments associated with a TeamSite workflow event. For information about
supported workflow events, see the TeamSite Administration Guide.

Man Page Group

Workflow/Job.

Usage
iwgeteventcomments [-h|-v] [-s servername] jobID taskID time eventname

-h Displays usage message.


-v Displays version.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the current
TeamSite server.
jobID Specifies the job to report information about. Job IDs are
represented as integers.
taskID Specifies the number of the task to report information about.
time The timestamp of the event (in seconds since epoch).
eventname Specifies the name of the event. For information about supported
workflow events, see the TeamSite Administration Guide.

Example
% iwgeteventcomments 1000 15 1093048309 TaskAddFile

Displays all comments associated with the TaskAddFile event from task 15 in job 1000
and having a timestamp of 1093048309.

Interwoven, Inc. 136


Chapter 3: Development Tools

iwgeteventfiles
Displays a list of files associated with a TeamSite workflow event. For information
about supported workflow events, see the TeamSite Administration Guide.

Man Page Group

Workflow/Job.

Usage
iwgeteventfiles [-h|-v] [-s servername] jobID taskID time eventname

-h Displays usage message.


-v Displays version.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the current
TeamSite server.
jobID Specifies the job to report information about. Job IDs are
represented as integers.
taskID Specifies the number of the task to report information about.
time The timestamp of the event (in seconds since epoch).
eventname Specifies the name of the event. For information about supported
workflow events, see the TeamSite Administration Guide.

Example
% iwgeteventfiles 1000 15 1093048309 TaskAddFile

Displays a list of files associated with the TaskAddFile event from task 15 in job 1000
and having a timestamp of 1093048309.

TeamSite Command-Line Tools 137


Chapter 3: Development Tools

iwgettaskbyname
Writes the task ID to stdout for a task specified by name.A non-zero exit status
indicates a non-normal command execution, such as no task was found with the
specified name.

Man Page Group

Workflow/Job.

Usage
iwgettaskbyname [-h] [-v] [-s servername] workflowID taskName

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
workflowID Job in which to look up task.
taskName Name of task to look up.

Example
% iwgettaskbyname 1000 My_Approval_Task

where 1000 is a job ID.

Interwoven, Inc. 138


Chapter 3: Development Tools

iwgetwfobj
Displays the state of any part of the server workflow subsystem in XML. It can be called
in the following ways:
„ By passing no arguments, in which case it displays the workflow registry.
„ By passing a single job ID for a job that is still running, in which case it displays the
state of that job.
„ By a task ID, in which case it displays the state of that particular task.
„ By setting the -c option, in which case it displays all completed jobs that are
archived for TeamSite Reporting purposes.

Output format is described below in the “DTDs” section.

Man Page Group

Workflow/Job.

Usage
iwgetwfobj [-h|-v] [-r] [-c] [-s servername] [jobID|taskID]

-h Displays usage message.


-v Displays version.
-r Prints all objects below the specified object recursively.
-c Displays a list of all completed jobs that are archived for
reporting purposes.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the current
TeamSite server.
jobID Specifies the job to report information about. Job IDs are
represented as integers.
taskID Specifies the task to report information about. Task IDs are
represented as integers.

Example

The following command generates information about task 7734:

% iwgetwfobj 7734

DTDs

Output from iwgetwfobj conforms to the DTDs described in the “Job Specification
Files” chapter of the Workflow Developer’s Guide.

TeamSite Command-Line Tools 139


Chapter 3: Development Tools

iwinvokejob
Turns on or runs a job that has been instantiated in the server.

Man Page Group

Workflow/Job.

Usage
iwinvokejob [-h|-v] [-s servername] jobID

-h Displays usage message.


-v Displays version.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the current
TeamSite server.
jobID Specifies which job to run. Job IDs are represented as integers.

Example

The following command starts job 7734 on the server production.example.com:


% iwinvokejob -s production.example.com 7734

Interwoven, Inc. 140


Chapter 3: Development Tools

iwjobc
Instantiates a job into the server based on a specified job specification file and prints (in
decimal) the ID of the job.

Man Page Group

Workflow/Job.

Usage
iwjobc [-h|-v] [-i] [-s servername] workflowfile

-h Displays usage message.


-v Displays version.
-i Invoke job after compilation.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the current
TeamSite server.
workflowfile Specifies the area-relative path name of the workflow
specification file.

Example

The following command instantiates the job defined in config.xml:


% iwjobc config.xml

TeamSite Command-Line Tools 141


Chapter 3: Development Tools

iwjobvariable
Manipulates workflow variables.

Man Page Group

Workflow/Job.

Usage
iwjobvariable [-h|-v] [-s servername]
[-g key|-c key value|-t key value|-d key] [-q] workflowid

-h Print help.
-v Print version.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the current
TeamSite server.
-g key Get value of workflow variable key. Prints value to standard
output.
-c key value Create variable key with value value. It is an error if key already
exists.
-t key value Set variable key to value value. If variable key does not exist,
create it.
-d key Delete variable key.
-q Suppress all error messages.
workflowid Specifies the identifier of the workflow.

Example
% iwjobvariable -g foo

gets the value of the foo job variable.

Interwoven, Inc. 142


Chapter 3: Development Tools

iwlasted
Displays the name of the most recent edition on a branch.

Man Page Group

Edition Operation.

Usage
iwlasted [-h|-v] [-k] branchvpath

-h Displays usage message.


-v Displays version.
-k Displays the name of the most recent edition on a branch which
may be published or unpublished.
Without this flag, the most recent edition that has been
published is returned.
branchvpath Vpath of a branch (see page 15).

Example
% iwlasted main

Returns:
ed_0001

TeamSite Command-Line Tools 143


Chapter 3: Development Tools

iwldapmigrate
Creates a new version of tsusers.xml containing LDAP OS user information
previously stored in tsldapuserscache.xml (which is not supported starting with
TeamSite 6.7.1 SP1). Also reads LDAP configuration information from iw.cfg and
uses it to configure the LDAP server in user_databases.xml. Runs automatically when
TeamSite 6.7.1 SP1 or later is installed on a system already hosting TeamSite and
configured to use an LDAP server. Can also be run from the command line. The
database created in user_databases.xml is named LDAP_USER_DB by default.

Man Page Group

General Development.

Usage
iwldapmigrate [-h|-v|-i ldap_db_id]

-h Displays usage message.


-v Displays version.
-i ldap_db_id Specifies that the LDAP database defined in
user_databases.xml be named ldap_db_id rather than the
default name LDAP_USER_DB. If a database having the name
specified by ldap_db_id already exists, the database is instead
named by adding a numeric suffix to LDAP_USER_DB (for
example LDAP_USER_DB_1, LDAP_USER_DB_2, and so on).

Notes
„ The TeamSite server (iwserver) must not be running when this CLT is executed.
„ The original tsusers.xml file, if present, is renamed
tsusers.xml.backup_ldapmigrate_1. If that file name already exists, the next
available whole number is used for the file name suffix (for example,
tsusers.xml.backup_ldapmigrate_2).

„ When LDAP OS user information is migrated from tsldapuserscache.xml to


tsusers.xml, the value of userdbid in tsusers.xml is set to the ID of the LDAP
server.
„ If any user definitions exist in tsusers.xml prior to the execution of this CLT, they
are not automatically merged into the new version of tsusers.xml that is created
when the CLT is executed. If there are user definitions in the old version of
tsusers.xml (renamed tsusers.xml.backup_ldapmigrate_1) that you want to
retain, you must merge them manually into tsusers.xml after executing this CLT.
„ When this CLT executes, the only files that are modified are user_databases.xml
and tsusers.xml. All other configuration files (iw.cfg, tsldapuserscache.xml,
and so on) are left as-is in case a previous version of TeamSite needs to be restored.

Interwoven, Inc. 144


Chapter 3: Development Tools

„ A log file, /local/logs/iwldapmigration.log, is generated when this CLT is


executed.
„ If you install TeamSite 6.7.1 SP1 on a system hosting a previous version of
TeamSite, but that system was not configured to use an LDAP server, this CLT does
not execute during the TeamSite installation.

Example
% iwldapmigrate -i corp_ldap

TeamSite Command-Line Tools 145


Chapter 3: Development Tools

iwldapsearch
A search program to query an LDAP user database. Works similarly to the ldapsearch
utilities supplied by various LDAP vendors, but understands how to read TeamSite
configuration information from iw.cfg and user_databases.xml. Accepts similar
arguments to most ldapsearch utilities, but will read TeamSite configuration
information when available. Unlike most LDAP search utilities, iwldapsearch can also
use SSL for its queries. See the TeamSite Administration Guide for details about iw.cfg
and user_databases.xml.

Man Page Group

General Development.

Usage
iwldapsearch [options] filter [attributes]

options See next table.


filter An RFC-1588 compliant LDAP search filter.
attributes A whitespace-separated list of attributes to retrieve. If no
attribute list is given, all are retrieved.

Options:

-b baseDn Distinguished name (DN) base location. Default is


o=interwoven,c=us.
-h hostName Name of the server where the LDAP database to be searched
resides. Default is localhost.
-p portNumber Port number of the server where the LDAP database to be
searched resides. Defaults are 389 for normal queries, 636 for
SSL.
-s scope Scope of the LDAP database to search. Legal values: base,
one, and sub. Default is sub.
-t user_db_id TeamSite ID of the LDAP database to search (the value of the
id attribute in the iwldap element in user_databases.xml). If
-t is specified, the parameters defined for user_db_id in
user_databases.xml are used for the search. If -t is not
specified, and if iwldapsearch is used on a system where a
TeamSite release prior to 6.7.1 SP1 is installed, the default
values for various parameters are replaced with values from
iw.cfg. See “Replacement Values” on page 147 for details.
-v Display informational messages. Default is OFF.
-w password Authentication password. Default is NULL.
-A Retrieve attribute names only (no values).
-D bindDN DN to bind with. Default is NULL.

Interwoven, Inc. 146


Chapter 3: Development Tools

-F separator Display the string separator instead of = between attribute


names and values.
-nodn Omit DN from the display for each record.
-nonewline Omit newline following each record.
-P path Name of the directory containing containing the SSL
Certificate Authority file. Default is the current directory.
-Z Enable SSL. Default is no SSL.

Replacement Values

When iwldapsearch is used on a system where TeamSite is installed, and if the -t


option is not specified, the default values for various parameters are replaced with
values from iw.cfg. The following parameters from the [authentication] section of
iw.cfg are used:

ldap_dnbase DN of search base; same as the -b option.


ldap_server LDAP host; same as the -h option.
ldap_port Port for non-SSL use; same as the -p option when SSL is not
used.
ldap_ssl_port Port for SSL use; same as the -p option when SSL is used.
ldap_ca_file Certificate Authority file to use for SSL. Same as the -P option.
ldap_account Bind account; same as the -D option.
ldap_pwd Bind password; same as the -w option.

Example

The configuration for LDAP database serverlab2w2k3-adam is as follows:


<iwldap id="serverlab2w2k3-adam" display_name="serverlab2w2k3-adam"
os="f">
<server value="serverlab2w2k3.tech.iwov">
</server>
<port value="389">
</port>
<search_key value="uid">
</search_key>
<dnBase value="(DC=interwoven,DC=com)">
</dnBase>
<account value="CN=Mary Baker,OU=ADAM users,DC=interwoven,DC=com">
</account>
<password
value="52616e646f6d4956c82bafa0f007058503dd695e09c991707efae0898fe54517">
</password>
<attr_email value="mail">
</attr_email>
<attr_display_name value="cn">

TeamSite Command-Line Tools 147


Chapter 3: Development Tools

</attr_display_name>
<attr_sync name="businessCategory" value="admin,master,author,editor,
tsusers,ccpro,ccstd,ccpro_only,ccstd_only">
</attr_sync>
</iwldap>

Both of these queries give the same result when searching this database. The following
query uses the -t option so the search uses parameters specified for
serverlab2w2k3-adam in the userdatabases.xml file:
C:\Interwoven\cc2.1.1\output\nti86.DEV\src\clt>iwldapsearch -t
serverlab2w2k3-adam (businessCategory=master)

This query specifies the search parameters explicitly from the command line:
C:\Interwoven\cc2.1.1\output\nti86.DEV\src\clt>iwldapsearch -h
serverlab2w2k3.tech.iwov -b "DC=interwoven,DC=com" -s sub -D "CN=Mary
Baker,OU=ADAM users,DC=interwoven,DC=com" -w mbakerr
(businessCategory=master)

The output of either query is:


CN=Mary Baker,OU=ADAM users,DC=interwoven,DC=com
objectClass = top
objectClass = person
objectClass = organizationalPerson
objectClass = user
cn = Mary Baker
businessCategory = master
businessCategory = ccpro
distinguishedName = CN=Mary Baker,OU=ADAM users,DC=interwoven,DC=com
instanceType = 4
whenCreated = 20070313211643.0Z
whenChanged = 20070510181652.0Z
uSNCreated = 12423
memberOf = CN=Readers,CN=Roles,DC=interwoven,DC=com
memberOf = CN=Users,CN=Roles,DC=interwoven,DC=com
memberOf = CN=Administrators,CN=Roles,DC=interwoven,DC=com
uSNChanged = 86026
name = Mary Baker
badPwdCount = 0
badPasswordTime = 128233945717479133
pwdLastSet = 128221818245971619
objectSid =
lockoutTime = 0
objectCategory =
CN=Person,CN=Schema,CN=Configuration,CN={FCBD6315-491A-44B1-AC99-7F6699A7
9F98}
lastLogonTimestamp = 128232946127509645
uid = mbaker
mail = mbaker@interwoven.com

CN=Bob Brinker,OU=ADAM users,DC=interwoven,DC=com


objectClass = top
objectClass = person

Interwoven, Inc. 148


Chapter 3: Development Tools

objectClass = organizationalPerson
objectClass = user
cn = Bob Brinker
businessCategory = ccpro
businessCategory = master
distinguishedName = CN=Bob Brinker,OU=ADAM users,DC=interwoven,DC=com
instanceType = 4
whenCreated = 20070319220732.0Z
whenChanged = 20070319220732.0Z
uSNCreated = 73763
uSNChanged = 73763
name = Bob Brinker
badPwdCount = 0
badPasswordTime = 0
pwdLastSet = 128188156525309548
objectSid =
lockoutTime = 0
objectCategory =
CN=Person,CN=Schema,CN=Configuration,CN={FCBD6315-491A-44B1-AC99-7F6699A7
9F98}
uid = bbrinker
mail = bbrinker@interwoven.com

TeamSite Command-Line Tools 149


Chapter 3: Development Tools

iwldapsync
Synchronizes information about TeamSite users from one or more LDAP servers.
Modifies entries in tsusers.xml based on configuration settings in
user_databases.xml and information obtained from LDAP servers. Invoked when
iwserver is first started and periodically afterwards as specified by ldap_thread_delay
in the [authentication] section of iw.cfg. Can also be run manually from the
command line. Output is written to iw-home/local/logs/iwldapsync.log unless the
-t option is specified. See the TeamSite Administration Guide for details about editing
iw.cfg and user_databases.xml to configure what action is taken when iwldapsync is
run.

Man Page Group

General Development.

Usage
iwldapsync [-h|-v|-t]

-h Displays usage message.


-v Displays version.
-t Test mode. When specified, no changes are made to
tsusers.xml, output is written to stdout, and no entries are
made in iwldapsync.log.

Interwoven, Inc. 150


Chapter 3: Development Tools

iwlist
Displays list of all subcomponents in a container.

Man Page Group

General Development.

Usage
iwlist [-h|-v] [-a|-l|-s] [-m [-u user]] [-i] [-k] vpath

-h Displays usage message.


-v Displays version.
-a Lists all the components of a branch.
-l Long listing.
-s Short listing.
-m Displays all files modifiable by user.
-u user Specifies the username of a TeamSite user (defaults to the current
user).
-i Displays branch name in UTF-8 format.
-k Displays all editions (published and implicit).
vpath Specifies the vpath of the parent area (see page 15).

Examples
% iwlist main

Returns:
branch1
branch2

Use the -a tag to include all editions and workareas on the branch.
% iwlist -a main

Returns:
wa1
wa2
INITIAL
ed_001
branch1
branch2

TeamSite Command-Line Tools 151


Chapter 3: Development Tools

% iwlist -a -l main

Returns a full list of objids, comments, and base editions for all subbranches, workareas,
and editions on the branch:
wa1
andre’s workarea
2205
INITIAL
----------------------------------------------
wa2
chris’s workarea
2205
ed_0001
----------------------------------------------
----------------------------------------------
INITIAL
Initial empty edition
0

0
----------------------------------------------
ed_001

2205
INITIAL
1
----------------------------------------------
----------------------------------------------
branch1
test branch
2205
ed_002
----------------------------------------------
branch2
redesign branch
31001
INITIAL
----------------------------------------------

Interwoven, Inc. 152


Chapter 3: Development Tools

iwlistlocks
Lists the locks and assignments in a workarea or branch. Displays the following
information: lock date, file path, workarea, state, creator/assigner, owner/assignee,
comments. To see if a file is locked, see the istagged attribute of iwattrib (page 112).

Man Page Group

Workarea Operation.

Usage
iwlistlocks [-h|-v] vpath

-h Displays usage message.


-v Displays version.
vpath Vpath to workarea or branch (see page 15).

Example
% iwlistlocks main

Returns a list of all the locks (including assignments) in all workareas on the main
branch. The information is in columns—date, path to the file relative to the workarea,
workarea containing the lock, status, user who locked the file, owner of the lock,
comments—as follows:
[Tue Aug 22 10:31:32 2000] /htdocs/about2.html wa1 LOCKED andre andre
Locked%20by%20launching%20edit
[Tue Aug 22 10:34:15 2000] /htdocs/banner.gif wa1 ASSIGNED andre pat
add%20support%20section
[Tue Aug 22 10:34:40 2000] /htdocs/index.html wa1 DONE andre pat
added%20new%20links
[Tue Aug 22 10:36:29 2000] /htdocs/products.html wa2 LOCKED chris chris
<none>

TeamSite Command-Line Tools 153


Chapter 3: Development Tools

iwlistmod
Displays a list of all modified files and directories in the specified workarea or workarea
directory.

Man Page Group

Workarea Operation.

Usage
iwlistmod [-h|-v] vpath

-h Displays usage message.


-v Displays version.
vpath Vpath to a workarea or directory (see page 15).

In the output of iwlistmod:

x+ indicates a deleted file or directory

f+ indicates a modified or new file

d indicates a new directory

Examples
% iwlistmod /default/main/WORKAREA/andre

Returns:
x+ assets/images/iwhead60.gif
x+ assets/images/iwlogo49.gif
f+ html/support/testing_form.html
f+ html/support/index.html
f+ html/support/instructions.html
d html/newdir/
f+ index.html

% iwlistmod /default/main/WORKAREA/andre/html/support

Returns:
f+ testing_form.html
f+ index.html
f+ instructions.html

Interwoven, Inc. 154


Chapter 3: Development Tools

iwlock
Locks any file in any TeamSite workarea. For a description of TeamSite locking, see the
ContentCenter online help.

Man Page Group

Workarea Operation.

Usage
iwlock [-h|-v] [-f|-s] vpath comment [ownerid]

-h Displays usage message.


-v Displays version.
-f Force update.
-s Suppress update.
vpath Specifies the file to lock.
comment Comment attached to the file.
ownerid Username of the lock owner.

Example
% iwlock branch1/WORKAREA/wa1/test.html 'need to use this for a while'

Locks the file test.html in the workarea wa1 on the subbranch branch1. The comment
attached is “need to use this for a while”. Because no owner is specified, the lock owner
is the user who locked it.

Forcing an update will take the version in the staging area to edit, regardless of whether
it is the newer version. Suppressing an update will take the version in the workarea,
regardless of whether it is newer than the version in the staging area.

TeamSite Command-Line Tools 155


Chapter 3: Development Tools

iwlockinfo
Provides detailed information on any lock held in TeamSite, such as who holds the lock
and in what workarea.

Man Page Group

Workarea Operation.

Usage
iwlockinfo [-h|-v] vpath

-h Displays usage message.


-v Displays version.
vpath Specifies a vpath to a file.

Example
% iwlockinfo main/branch1/WORKAREA/wa1/test.html

Returns:
Name: test.html
Area: wa1
Time Stamp: [Wed Mar 02 15:52:44 2005]
Assignor: andre
Assignee: andre
State: Locked
Comments: fixing some links

NOTE
test.html is locked in workarea wa1 by Andre, with the comment “fixing some links”
attached.

% iwlockinfo main/branch1/WORKAREA/wa1/htdocs/index.html

Returns:
Name: index.html
Area: wa1
Time Stamp: [Wed Mar 02 15:52:44 2005]
Assignor: andre
Assignee: pat
State: Done
Comments: fix the marketing link.
fixed!

showing index.html in workarea wa1 has been assigned by Andre to Pat, and that Pat
has marked it Done. Comments attached to the file are “fix the marketing link. fixed!”

Interwoven, Inc. 156


Chapter 3: Development Tools

iwmerge
Merges files from one area into another.

Man Page Group

General Development.

Usage
iwmerge [-h|-v] [-n] [-p] [-m|-c] [-a area] [files...]

-h Prints usage message.


-v Prints the version string.
-n Displays changes without updating files.
-p Writes merges to stdout.
-m Resolves non-overlapping merges.
-c Leaves annotated overlapping merge conflicts in file.
-a area Area to merge from. Defaults to STAGING.
files Specifies files to merge.

TeamSite Command-Line Tools 157


Chapter 3: Development Tools

iwmkbr
Creates a new TeamSite branch. For more information on creating TeamSite branches,
see the ContentCenter online help.

Man Page Group

Branch Operation.

Usage
iwmkbr [flags] parent brname comment rooted [ownerid [groupid]]

parent Vpath of the parent branch of the new branch (see page 15).
brname Name of the new branch.
comment Description of the new branch.
rooted Name of edition in the parent branch to serve as a basis for the
new branch.
ownerid Username of the owner of the new branch.
groupid OS or TeamSite group name of the group of Administrators that
has Administrator-level access to the new branch.

Flags

-h Displays usage message.


-v Displays version.
-ls Create branch with submit locking [default].
-lo Create branch with optional write locking.
-lm Create branch with mandatory write locking.

Example
% iwmkbr //IWSERVER/default/main branch1 'test branch' INITIAL andre

creates a subbranch called branch1 off of the main branch. The comment attached to
this branch is “test branch”. It is based on the initial edition of the main branch, and it is
owned by user andre. There is no group of Administrators for this branch (only andre
has Administrator-level privileges for the branch), and the locking model used is the
default, submit locking.

Interwoven, Inc. 158


Chapter 3: Development Tools

iwmkwa
Creates a new TeamSite workarea on a branch. For more information on creating
TeamSite workareas, see the ContentCenter online help.

Man Page Group

Workarea Operation.

Usage
iwmkwa [-h|-v] branchvpath waname comment base_ed [ownerid [groupid]]

-h Displays usage message.


-v Displays version.
branchvpath Vpath of the branch to create the new workarea on (see page 15).
waname Name of the new workarea.
comment Comment attached to the workarea.
base_ed Specifies which edition on the branch to base the workarea on.
ownerid Specifies who owns the workarea.
groupid Specifies the OS or TeamSite group that has access to the
workarea.

Example
% iwmkwa main/branch1 wa1 '' INITIAL chrisc

This creates a workarea named wa1 on the subbranch branch1. No comment has been
attached to this workarea, and it is based on the initial edition of the branch and owned
by chrisc. This is a private workarea because no group has access to it.

TeamSite Command-Line Tools 159


Chapter 3: Development Tools

iwmvtaskfile
Renames a file that is attached to a TeamSite task.

Man Page Group

Workflow/Job.

Usage
iwmvtaskfile [-h] [-v] [-s servername] taskid src dest

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
taskid Task in which to move file.
src Source path (relative to area).
dst Destination path (relative to area).

Example
% iwmvtaskfile 1200 content/images/tobemoved.gif images/tobemoved.gif

where 1200 is a task ID and content/images/tobemoved.gif is a file to be moved to


images/tobemoved.gif.

Interwoven, Inc. 160


Chapter 3: Development Tools

iwndxaddbr
Adds a branch to the index manager to be indexed. The branch might not be indexed
immediately by the index manager, depending on the current server load and the size of
the branch. Use iwndxstatus to verify whether the branch was indexed.

Man Page Group

Search and Index.

Usage
iwndxaddbr [-h|-v]
iwndxaddbr branchpath

-h Displays usage message.


-v Displays version.
branchpath Specifies the path of the branch to index.

Example
% iwndxaddbr /default/main

Returns:
Success.

TeamSite Command-Line Tools 161


Chapter 3: Development Tools

iwndxfreezebr
Freezes or unfreezes a branch to be indexed by the index manager. Freezing suspends all
indexing activity on that branch. Unfreeze resumes the indexing of the branch. Any
existing indexes for the branch are still available for query operations even if the branch
is frozen.

Man Page Group

Search and Index.

Usage
iwndxfreezebr [-h|-v|-u branchpath]
iwndxfreezebr branchpath

-h Displays usage message.


-v Displays version.
-u Unfreezes the specified branch.
branchpath Specifies the path of the branch to freeze or unfreeze.

Example
% iwndxfreezebr /default/main

freezes indexing on the /default/main branch and returns:


Success.

% iwndxfreezebr -u /default/main

unfreezes indexing on the /default/main branch and returns:


Success.

Interwoven, Inc. 162


Chapter 3: Development Tools

iwndxlistbr
Displays a list of the paths of all fully and partially indexed branches.

Man Page Group

Search and Index.

Usage
iwndxlistbr [-h|-v]

-h Displays usage message.


-v Displays version.

Example

% iwndxlistbr

Returns a list similar to the following:


Indexed branches:
\\server1\default\main
\\server1\default\main\testBranch

TeamSite Command-Line Tools 163


Chapter 3: Development Tools

iwndxmgrfreeze
Freezes and unfreezes the index manager. Freezing suspends all indexing activities.
Unfreezing resumes all indexing activities.

Man Page Group

Search and Index.

Usage
iwndxmgrfreeze [-h|-v|-u]

-h Displays usage message.


-v Displays version.
-u Unfreezes the index manager.

Example
% iwndxmgrfreeze

Freezes the index manager and returns:


Success.

Notes
„ Once frozen, the index manager remains so until an unfreeze command is issued.
„ Use iwndxmgrstatus prior to iwndxmgrfreeze to determine whether the index
manager is already frozen.
„ You can perform search queries even if the index manager is frozen.

Interwoven, Inc. 164


Chapter 3: Development Tools

iwndxmgrstatus
Displays whether the index manager is frozen.

Man Page Group

Search and Index.

Usage
iwndxmgrstatus [-h|-v]

-h Displays usage message.


-v Displays version.

Example

% iwndxmgrstatus

If the index manager is frozen, returns:


FROZEN.

If the index manager is not frozen, returns:


ACTIVE.

TeamSite Command-Line Tools 165


Chapter 3: Development Tools

iwndxmgrstop
Sends a shutdown command to the index manager.

Man Page Group

Search and Index.

Usage
iwndxmgrstop [-h|-v]

-h Displays usage message.


-v Displays version.

Example

% iwndxmgrstop

stops the index manager. This command does not display a return message.

NOTE
This command does not verify that the index manager shut down successfully. Check
the index log file or list of processes to verify index manager status.

Interwoven, Inc. 166


Chapter 3: Development Tools

iwndxpurgebr
Deletes the index collections and all other indexing information associated with a
branch from the index manager’s memory and from the system’s disk.

Man Page Group

Search and Index.

Usage
iwndxpurgebr [-h|-v]
iwndxpurgebr branchpath

-h Displays usage message.


-v Displays version.
branchpath Specifies the path of the branch to purge.

Example

% iwndxpurgebr /default/main

Returns:
Success.

NOTE
Use caution when executing iwndxpurgebr. Unlike iwndxrmbr, iwndxpurgebr also
deletes the indexing information from the system’s disk. If, after issuing iwndxpurgebr,
you need to reindex this branch using iwndxaddbr, the entire indexing information will
need to be recreated.

TeamSite Command-Line Tools 167


Chapter 3: Development Tools

iwndxrefreshbr
Indexes a branch by putting it in the bulk or incremental queue. In general, use the bulk
queue to index a branch for the first time, and use the incremental queue to index
additional or modified files on a branch that is already indexed. Using the bulk queue
typically takes longer than using the incremental queue. However, if the index has not
been updated for a long time, using the incremental queue can be time consuming. In
these cases, it may be preferable to use the bulk queue so that the incremental queue
remains available for other updates.

Man Page Group

Search and Index.

Usage
iwndxrefreshbr [-h|-v]
iwndxrefreshbr [-b|-i] branchpath

-h Displays usage message.


-v Displays version.
-b Reindexes the branch by putting it in the bulk queue (default).
-i Reindexes the branch by putting it in the incremental queue.
branchpath Specifies the path of the branch (see page 15).

Examples
% iwndxrefreshbr -b /default/main

indexes /default/main using the bulk queue and returns:


Success.

% iwndxrefreshbr -i /default/main

reindexes /default/main using the incremental queue and returns:


Success.

Interwoven, Inc. 168


Chapter 3: Development Tools

iwndxrmbr
Deletes the index collections and all other indexing information associated with a
branch from the index manager’s memory, but retains the information on the system’s
disk.

Man Page Group

Search and Index.

Usage
iwndxrmbr [-h|-v]
iwndxrmbr branchpath

-h Displays usage message.


-v Displays version.
branchpath Specifies the path of the branch to remove.

Example
% iwndxrmbr /default/main

Returns:
Success.

NOTE
Because this command removes indexing information just from memory (and not from
disk), reindexing a branch after using iwndxrmbr is much faster compared to using
iwndxpurgebr because the index manager can retrieve and use the relevant original
information rather than completely rebuild the index.

TeamSite Command-Line Tools 169


Chapter 3: Development Tools

iwndxstatus
Displays the current index status from the index manager for all indexed branches or a
list of specified branches. Output is in XML format.

Man Page Group

Search and Index.

Usage
iwndxstatus [-h|-v] -a [-f]
iwndxstatus [-f] branchpath1 branchpath2 ...

-h Displays usage message.


-v Displays version.
-a Displays the index status for all full- and partially-indexed
branches.
-f Generates output in a more readable format instead of the default
XML format.
branchpath1... Displays the index status for specified branch(es).

Example s

% iwndxstatus /default/main

Returns the index status of the /default/main branch on the index manager (similar to
the following):
<branch_index_status_list>
<branch_index_status>
<branch>
<serverid>010000000000000051000000</serverid>
<archiveid>640000000000000020200000</archiveid>
<branchid>0C0100000000000050220000</branchid>
</branch>
<vpath>/default/main</vpath>
<status>11</status>
<last_indexed_edition>testEdition1</last_indexed_edition>
<last_indexed_edition_creation_time>1089325560000</
last_indexed_edition_creation_time>
<freeze_status>UNFROZEN</freeze_status>
<workarea_index_status>TRUE</workarea_index_status>
<collection_list>
<collection>0100000000000000510000006400000000000000202000000C01000000000
00050220000_1</collection>
</collection_list>
</branch_index_status>

Interwoven, Inc. 170


Chapter 3: Development Tools

</branch_index_status_list>

% iwndxstatus -a

Returns the index status of all indexed branches on the index manager.

Notes
„ If the value inside the <last_index_edition> element starts with # (for example,
#4), the edition is most likely anonymous.

„ Values used in the <status> element are as follows:


10: Not indexed
11: Indexed
12: Partially indexed

TeamSite Command-Line Tools 171


Chapter 3: Development Tools

iwndxwamodificationsbr
Enables or disables the indexing of workareas of the specified branch (which is being
indexed by the index server).

Man Page Group

Search and Index.

Usage
iwndxwamodifcationsbr [-h|-v] branchpath
iwndxwamodifcationsbr [-h|-v] -u branchpath

-h Displays usage message.


-v Displays version.
branchpath Enables the indexing of workareas on the specified branch.
-u branchpath Disables the indexing of workareas on the specified branch.

Examples

% iwndxwamodificationsbr /default/main

Enables the indexing of the workareas on this branch, causing all modified files in these
workareas to be indexed and available for later searches.

% iwndxwamodificationsbr -u /default/main

Disables the indexing of the workareas on this branch, causing all modified files in these
workareas to not be available for later searches.

Interwoven, Inc. 172


Chapter 3: Development Tools

iwnexted
Displays the name that would be automatically generated by the iwpublish -a
command for the next edition on a branch.

Man Page Group

Edition Operation.

Usage
iwnexted [-h|-v] branchvpath

-h Displays usage message.


-v Displays version.
branchvpath Specifies the vpath of the branch (see page 15).

Example

If the last edition on the main branch is named ed_0001,

% iwnexted main

Returns:
ed_0002

If the name of the last edition ends with a number, iwnexted will increment it. If it does
not, iwnexted will append a number to the name.

TeamSite Command-Line Tools 173


Chapter 3: Development Tools

iwprop
Manipulates TeamSite user properties.

Man Page Group

General Development.

Usage
iwprop identity action options property ...

identity

[-name] nm Work with the entry whose name is nm.


-id eid Work with the entry whose ID is eid. The syntax of an entry ID
is either:
• user::UID:
• group::UID:
where UID: is a UNIX ID. At least one UID: should be specified.
-group Entry refers to a group (-user and -group are mutually
exclusive).
-loc el Work with the entry whose locator is el.
-session s Extract user name from session string s. It is mutually exclusive
with -name (it implies -user).
-user Entry refers to a user (-user and -group are mutually exclusive)
This is the default.

action

-set or -s Modify or create one or more properties.


-get or -g Print the value of one or more properties (default).
-delete or -d Delete one or more existing properties.

Interwoven, Inc. 174


Chapter 3: Development Tools

options

-a Automatically create a user or group if it does not exist.


-h Display help information.
-v Display version information.
-D Use the local user database directly
-F path Specifies the path of the local user database
-n Suppress inheritance from related groups

property

For the -get and -delete action, one or more instances of the form:
[mode] [-key] K

where K specifies the property’s key. The -key is only required if K could be confused
with another command line option or contains an equal sign (=).

For the -set action, prop can have either of two forms:
„ [mode] K=V
„ [mode] [-key] K [-value V]

Where K is the property’s key and V is the new value. In the first form, V is assumed to
start immediately after the first equal sign (=). The second form can be used if K
contains an embedded equal sign (=); however, the -value argument must immediately
follow K or the property is assigned an empty value. Note that shell escape characters
may be required if K or V contains special characters such as a blank space or double
quotes (“...”).

If no property is specified, -get displays all properties. At least one property must be
specified for -set and -delete.

mode modifies the way key K of a property is matched and may cause a single property
to apply to more than one property. Valid modes are:

-exact or -e K must match the property key exactly (default).


-leading or -l K must be a leading substring of the property key.
-regex or -r K specifies a regular expression that matches the key.

TeamSite Command-Line Tools 175


Chapter 3: Development Tools

iwprv
Allows users to identify whether any file or directory in any workarea is marked private
and automatically mark any file as either private or public. For a full description of
private and public files and directories, see the ContentCenter online help.

Man Page Group

Workarea Operation.

Usage
iwprv [-h|-v] [-c|-g|-s] list-of-vpath

-h Displays usage message.


-v Displays version.
-c Clear the private bit.
-g Get the private bit (returns 0 if the item is not private, 1 if it is)
(default). This option can only accept one vpath.
-s Set the private bit.
list-of-vpath List of vpaths of files and directories to mark private (see
page 15). Entries must be separated by spaces.

Examples
% iwprv -s main/br1/WORKAREA/wa1/gifs main/br1/WORKAREA/wa1/mktg
main/br1/WORKAREA/wa1/index.html main/br1/WORKAREA/wa1/main.html

makes the directories gifs and mktg and the files index.html and main.html private.

% iwprv -g main/br1/WORKAREA/wa1/gifs

Returns: 1 (indicating that the item is private)

% iwprv -c main/br1/WORKAREA/wa1/gifs main/br1/WORKAREA/wa1/mktg


main/br1/WORKAREA/wa1/index.html main/br1/WORKAREA/wa1/main.html

makes these same files and directories no longer private.

% iwprv -g main/branch1/WORKAREA/wa1/test.html

Returns: 0 (indicating that the item is not private)

Interwoven, Inc. 176


Chapter 3: Development Tools

iwpublish
Publishes the staging area on a branch. For more information on publishing editions, see
the ContentCenter online help.

Man Page Group

Edition Operation.

Usage
iwpublish -g [-w|-s] [-f] vpath area comment [ownerid]

iwpublish [-h|-v] [-w|-s] [-f] vpath area edition comment [ownerid]

-g Generates an edition name based on the last edition name.


-w Overrides conflicts.
-s Skips conflicts and files locked in another area.
-f Fails publish if there have been no changes since the last publish.
-h Displays usage message.
-v Displays version.
vpath Vpath of the branch whose area you want to publish. Can be a
full vpath (//server/archive/branch) or a relative path (as
shown in the example below).
area The vpath to the workarea or staging area you want to publish. If
a vpath to a workarea is given, the contents of the workarea are
submitted to staging, and then an edition based on the staging
area is published.
edition Name of the new edition.
comment Comment attached to the edition.
ownerid User ID of the owner of the branch.

Example
% iwpublish main/branch1 STAGING ed_002 'checkpoint'

publishes the staging area on the subbranch branch1 as edition ed_002 with the
comment “checkpoint” attached.

TeamSite Command-Line Tools 177


Chapter 3: Development Tools

iwqueryjobs
Reads a query from stdin and prints to stdout a list of job IDs that match the query
criteria. Query syntax is described in the DTD section.

Man Page Group

Workflow/Job.

Usage
iwqueryjobs[-h|-v][-x][-o offset][-m max][-l locale][-s servername]
<query

-h Displays usage message.


-v Displays version.
-x Returns output result in XML format.
-o offset Skips the first number of results specified by offset before
results are returned.
-m max Limits the number of returned results to the value specified by
max.
-l locale Specifies the locale for server-side sorting.
-s servername Specifies the server on which to check for matching query
criteria. Server names can be specified by name or IP address.
This is typically the TeamSite server.
<query The query to read from stdin.

Example

The following command searches for matching job IDs on the server
production.example.com:
% iwqueryjobs -s production.example.com

DTD

All queries must be in XML format that matches the following DTD:

<!ELEMENT wfquery (and|or|not|ownedby|active)>


<!ELEMENT and ((and|or|not|ownedby|active)+)>
<!ELEMENT or ((and|or|not|ownedby|active)+)>
<!ELEMENT not (and|or|not|ownedby|active)>
<!ELEMENT ownedby EMPTY>
<!ATTLIST ownedby v CDATA #REQUIRED>
!ELEMENT active EMPTY>

The ownedby element returns the job owned by the specified user. The active element
returns active jobs.

Interwoven, Inc. 178


Chapter 3: Development Tools

iwquerytasks
Reads a query from stdin and prints to stdout a list of task IDs that match the query
criteria. Query syntax is described below in the DTD section.

Man Page Group

Workflow/Job.

Usage
iwquerytasks[-h|-v][-x][-o offset][-m max][-l locale][-s servername]
<query

-h Displays usage message.


-v Displays version.
-x Returns output result in XML format.
-o offset Skips the first number of results specified by offset before
results are returned.
-m max Limits the number of returned results to the value specified by
max.
-l locale Specifies the locale for server-side sorting.
-s servername Specifies the server on which to check for matching query
criteria. Server names can be specified by name or IP address.
This is typically the TeamSite server.
<query The query to read from stdin.

Example

The following command searches for matching task IDs on the server
production.example.com:

% iwquerytasks -s production.example.com

DTD

All queries must be in XML format that matches the following DTD:

<!ELEMENT taskquery (and|or|not|ownedby|active|wfactive|wfownedby|


workflow|needsattention|type|sharedby|undoableby)>
<!ELEMENT and ((and|or|not|ownedby|active|wfactive|wfownedby|
workflow|needsattention|type|sharedby|undoableby)+)>
<!ELEMENT or ((and|or|not|ownedby|active|wfactive|wfownedby|
workflow|needsattention|type|sharedby|undoableby)+)>
<!ELEMENT not (and|or|not|ownedby|active|wfactive|wfownedby|
workflow|needsattention|type|sharedby|undoableby)>

TeamSite Command-Line Tools 179


Chapter 3: Development Tools

<!ELEMENT ownedby EMPTY>


<!ATTLIST ownedby v CDATA #REQUIRED>
<!ELEMENT active EMPTY>
<!ELEMENT wfactive EMPTY>
<!ELEMENT wfownedby EMPTY>
<!ATTLIST wfownedby v CDATA #REQUIRED>
<!ELEMENT workflow EMPTY>
<!ATTLIST workflow v CDATA #REQUIRED>
<!ELEMENT needsattention EMPTY>
<!ELEMENT type EMPTY>
<!ATTLIST type v (usertask, grouptask, externaltask,
cgitask, submittask, updatetask, endtask,
dummytask, locktask, wftask) #REQUIRED>
<!ELEMENT sharedby EMPTY>
<!ATTLIST sharedby v CDATA #REQUIRED>
<!ELEMENT undoableby EMPTY>
<!ATTLIST undoableby v CDATA #REQUIRED>

Expression and Element Descriptions

Table 23 Query expressions and elements


Expression/Element Description
active Displays tasks which are active.
and, or, and not Standard logical operations.
needsattention Displays submit or update tasks that have stalled because of
conflicts and cgi tasks that are ready to be run.
ownedby Displays tasks owned by the specified user.
sharedby Displays group tasks that can be grabbed by the specified
user.
type Displays tasks of the specified type.
undoable Displays user or group tasks that can have their chosen
transitions taken back.
wfactive Displays tasks that belong to active jobs.
wfownedby Displays tasks that belong to jobs owned by the specified
user.
workflow Displays tasks that belong to the specified job.

Interwoven, Inc. 180


Chapter 3: Development Tools

iwrcsdiff
Shows the differences between rev1 and rev2 of file. Provides functionality similar to
RCS's rcsdiff for TeamSite files.

Man Page Group

Version Management.

Usage
iwrcsdiff [flags] [-r rev1 [-r rev2]] [diff-options] filepath

rev1 and rev2 are revision numbers as displayed by iwrlog, or version strings (revision
IDs) as displayed by the History command from the GUI or by iwrlog.

Flags

-m Specifies the TeamSite mount directory (default obtained from


iwgetmount).
-h Displays usage message.
-v Displays version.
diff-options Can be obtained from rcsdiff
filepath Directory path to a file (not a vpath) (see page 17).

Examples
% iwrcsdiff -r 0x00000116000000e300000102 -r 0x000024de0000069d00000148
/iwmnt/default/main/WORKAREA/andre/htdocs/about2.html

Returns nothing because the contents of those files are the same.

If only one revision number is specified, iwrcsdiff will compare the specified version
with the version in the current area. From workarea andre:
% iwrcsdiff -r 0x00000116000000e300000102 htdocs/about2.html

Returns:
6a7
> foo bar

showing that the second version (the version in workarea andre) contains two words on
the sixth line that the first one does not.

If no revision number is specified, iwrcsdiff will compare the version in the current
workarea with the version in the staging area:

TeamSite Command-Line Tools 181


Chapter 3: Development Tools

% iwrcsdiff htdocs/about2.html

Returns:
1c1
< foo<HTML>
---
> <HTML>
6a7
> foo bar

showing that the first version of about2.html has the word “foo” on the first line and
the second version does not, whereas the second version has the words “foo bar” on the
sixth line and the first version does not.

Interwoven, Inc. 182


Chapter 3: Development Tools

iwrename
Renames any file, directory, workarea, edition, or branch (except main) in TeamSite.

Man Page Group

General Development.

Usage
iwrename [-h|-v] old_vpath new_vpath
iwrename [-h|-v] old_areavpath new_areaname

-h Displays usage message.


-v Displays version.
old_vpath Specifies a vpath to a file or directory to be renamed (see
page 15).
new_vpath Specifies the new vpath and name of the file or directory. If you
specify a new name without a vpath, the new file or directory is
created in the directory in which you run iwrename.
old_areavpath Specifies a vpath to a workarea, edition, or branch to be renamed.
new_areaname Specifies the new name (without vpath) of the workarea, edition,
or branch.

Examples
% iwrename main/branch1 test

changes the name of subbranch branch1 to test.

% iwrename main/test/WORKAREA/wa2 andre

changes the name of workarea wa2 to andre on the test subbranch.

% cd main/test/WORKAREA
% iwrename wa2 andre

changes the name of workarea wa2 to andre on subbranch test. The results are identical
to the preceding example; in this case no vpath was specified in the iwrename command
because wa2 is located in the working directory.

TeamSite Command-Line Tools 183


Chapter 3: Development Tools

iwretryjobop
Called when conflicts preventing successful completion of submit or update tasks have
been resolved.

Man Page Group

Workflow/Job

Usage
iwretryjobop [-h|-v|-o] [-s servername] taskID [comment]

-h Displays usage message.


-v Displays version.
-o Force submit or update.
-s servername Specifies the server on which the job is instantiated. Server
names can be specified by name or IP address.
taskID Specifies the task that will be retried. Task IDs are represented as
integers.
comment An optional comment.

Example

The following command retries task 7734 on the server production.example.com:


% iwretryjobop -s production.example.com 7734

Interwoven, Inc. 184


Chapter 3: Development Tools

iwrevert
Gives command-line users the same revert functionality that is available from the
history screen in the TeamSite GUI. That is, a user can now revert to any version of a
file via the command line.

Man Page Group

Version Management.

Usage
iwrevert [-h|-v] vpath rev

-h Displays usage message.


-v Displays version.
vpath Specifies a vpath to a file.
rev Specifies the version of the file to revert to. rev can have any of
these formats:
• A revision string, as displayed by iwrlog or the History screen
in the TeamSite GUI (for example, /main/br/52)
• A number, indicating how many revisions back (for example, 3
to revert to three versions ago)
• The object id of the version of the file (obtainable through
iwrlog).

TeamSite Command-Line Tools 185


Chapter 3: Development Tools

iwrlog
Shows a revision log for the specified TeamSite file. Provides functionality similar to
RCS’s rlog for TeamSite files.

Man Page Group

Version Management.

Usage
iwrlog [-h|-v][-c][-m] vpath

-h Displays usage message.


-v Displays version.
-c Omits comments/labels from listing.
-m Displays log information in machine-parsable format. Paths and
comments are URL-encoded; fields are separated by tabs.
vpath Vpath to a file (see page 17).

Example
% iwrlog -c /default/main/branch1/WORKAREA/andre/htdocs/index.html

Returns the revision number, date, user, and area containing that version for each
version of the file:
file /default/main/branch1/WORKAREA/andre/htdocs/index.html (locked)
working revision /main/branch1/6+
----------------------------
name /htdocs/index.html
revision /main/branch1/6+
last modified Wed Jul 26 11:26:13 2000 by andre in area andre
size 16911
objid 0x0000478f0000479200004816
submit event objid N/A
----------------------------
name /htdocs/index.html
revision /main/branch1/6
last modified Wed Jul 26 11:29:19 2000 by andre in area ed_0002
size 16919
objid 0x000048180000479d0000480f
submit event objid 0x00002258000000000000480e
----------------------------
name /htdocs/index.html
revision /main/branch1/5
last modified Wed Jul 26 11:26:13 2000 by andre in area ed_0001
size 16911

Interwoven, Inc. 186


Chapter 3: Development Tools

objid 0x000048060000479d00004805
submit event objid 0x000022580000000000004802
----------------------------
name index.html
revision /main/branch1/4
last modified Wed Jul 26 11:24:35 2000 by andre
size 16904
objid 0x0000480600004804000047fa
submit event objid 0x0000225800000000000047f7
----------------------------
name index.html
revision /main/branch1/3
last modified Tue Jul 25 18:59:51 2000 by andre
size 1206
objid 0x00004806000047f9000047b7
submit event objid 0x0000225800000000000047b4
----------------------------
name index.html
revision /main/branch1/2
last modified Tue Jul 25 18:58:46 2000 by andre
size 4
objid 0x00004806000047b6000047ac
submit event objid 0x0000225800000000000047a9
----------------------------
name index.html
revision /main/branch1/1
last modified Tue Jul 25 18:39:17 2000 by andre
size 0
objid 0x00004806000047ab000047a1
submit event objid 0x00002258000000000000479b
==================================================================
total revisions: 7
==================================================================

TeamSite Command-Line Tools 187


Chapter 3: Development Tools

iwrmbr
Removes the specified branch and all of its contents from TeamSite. For more
information on deleting TeamSite branches, see the ContentCenter online help.

Man Page Group

Branch Operation.

Usage
iwrmbr [-h|-v] branchvpath
iwrmbr [-h|-v] parentvpath brname

-h Displays usage message.


-v Displays version.
branchvpath Vpath of the branch to be deleted (see page 15).
parentvpath Vpath of the parent branch (see page 15).
brname Name of the branch to be deleted.

Example
% iwrmbr main branch1

removes the subbranch branch1 from the main branch.

Interwoven, Inc. 188


Chapter 3: Development Tools

iwrmed
Deletes any edition on a branch. For more information on deleting TeamSite editions,
see the ContentCenter online help.

Man Page Group

Edition Operation.

Usage
iwrmed [-h|-v] branchvpath edition

-h Displays usage message.


-v Displays version.
branchvpath Vpath of the branch on which the edition is located (see page 15).
edition Name of the edition to be removed.

Example
% iwrmed main/branch1 ed_001

removes the edition ed_001 from the subbranch branch1.

TeamSite Command-Line Tools 189


Chapter 3: Development Tools

iwrmjob
Unconditionally removes a job instance from the server. Only use as a last resort.

Man Page Group

Workflow/Job.

Usage
iwrmjob [-h|-v] [-s servername] jobID

-h Displays usage message.


-v Displays version.
-s servername Specifies the server on which the job is instantiated. Server
names can be specified by name or IP address.
jobID Specifies the job that will be removed. Job IDs are represented as
integers. Multiple job IDs may be specified.

Example

The following command removes job 7734 from the server production.example.com:
% iwrmjob -s production.example.com 7734

Interwoven, Inc. 190


Chapter 3: Development Tools

iwrmtaskfile
Removes a file from a specific task in an instantiated job.

Man Page Group

Workflow/Job.

Usage
iwrmtaskfile [-h|-v] [-s servername] taskID file

-h Displays usage message.


-v Displays version.
-s servername Specifies the server on which the job is instantiated. Server
names can be specified by name or IP address.
taskID Specifies the task from which the file will be removed. Task IDs
are represented as integers.
file Specifies the area-relative path of the file that will be removed
from the job task.

Example

The following command removes the file /default/main/WORKAREA/eng/content.txt


from job 7734 on the server production.example.com (assuming the command is
issued from the eng directory):
% iwrmtaskfile -s production.example.com 7734 content.txt

TeamSite Command-Line Tools 191


Chapter 3: Development Tools

iwrmtaskgroup
Removes groups from group tasks.

Man Page Group

Workflow/Job.

Usage
iwrmtaskgroup [-h] [-v] [-s servername] taskID group

-h Print this message.


-v Print version.
-s servername Use servername as TeamSite server.
taskID ID of task to change.
group OS or TeamSite group to remove from task.

Example
% iwrmtaskgroup -s darkstar 1973 approvers

Interwoven, Inc. 192


Chapter 3: Development Tools

iwrmtaskuser
Removes users from group tasks.

Man Page Group

Workflow/Job.

Usage
iwrmtaskuser [-h|-v] [-s servername] taskID user

-h Print this message.


-v Print version.
-s servername Use servername as TeamSite server.
taskID ID of task to change.
user User to remove from task.

Example
% iwrmtaskuser -s factotum 420 bukowski

TeamSite Command-Line Tools 193


Chapter 3: Development Tools

iwrmwa
Removes the specified workarea. For more information on deleting workareas, see the
ContentCenter online help.

Man Page Group

Workarea Operation.

Usage
iwrmwa [-h|-v] branchvpath workarea

-h Displays usage message.


-v Displays version.
branchvpath Vpath of the branch on which the workarea is located (see
page 15).
workarea Name of the workarea to be removed.

Example
% iwrmwa main/branch1 wa1

removes the workarea wa1 from the subbranch branch1.

Interwoven, Inc. 194


Chapter 3: Development Tools

iwsetjobdescription
Changes the description of a job.

Man Page Group

Workflow/Job.

Usage
iwsetjobdescription [-h|-v] [-s servername] workflowID description

-h Print this message.


-v Print version.
-s servername Use servername as TeamSite server.
workflowID ID of job to change.
description New description for job.

Example
% iwsetjobdescription 344 2002_press_releases

TeamSite Command-Line Tools 195


Chapter 3: Development Tools

iwsetjobowner
Changes the owner of a job.

Man Page Group

Workflow/Job.

Usage
iwsetjobowner [-h|-v] [-s servername] workflowID owner

-h Print this message.


-v Print version.
-s servername Use servername as TeamSite server.
workflowID ID of job to change.
owner New owner for job.

Example
% iwsetjobowner -s beavis 112 nickSaloman

Interwoven, Inc. 196


Chapter 3: Development Tools

iwsettaskattrib
Sets a new true or false value for a task attribute (for example, read-only or lock).

Man Page Group

Workflow/Job.

Usage
iwsettaskattrib [-h|-v] [-s servername] taskid name value

-h Print help message.


-v Print version.
-s servername Use servername as TeamSite server.
taskid ID of task to change.
name Name of attribute to modify.
value New value for attribute. Valid values are t (true) and f (false).

Example
% iwsettaskattrib -s maynard 462 readonly f

TeamSite Command-Line Tools 197


Chapter 3: Development Tools

iwsettaskcomment
Assigns a comment to a TeamSite task.

Man Page Group

Workflow/Job.

Usage
iwsettaskcomment [-h|-v] [-s servername] taskID comment

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
taskID ID of task to change.
comment Comment to set.

Example
% iwsettaskcomment 420 "All content looks valuable here. Tech Pubs is
doing a great job!"

Interwoven, Inc. 198


Chapter 3: Development Tools

iwsettaskdescription
Modifies an existing TeamSite task description.

Man Page Group

Workflow/Job.

Usage
iwsettaskdescription [-h|-v] [-s servername] taskID description

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
taskID ID of task to change.
description New description for task.

Example
% iwsettaskdescription 1200 "Add images to content"

TeamSite Command-Line Tools 199


Chapter 3: Development Tools

iwsettaskfilecomment
Assigns a comment to a file associated with a TeamSite task.

Man Page Group

Workflow/Job.

Usage
iwsettaskfilecomment [-h|-v] [-s servername] taskID path comment

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
taskID ID of task to change.
path Area relative path of file.
comment Comment to set.

Example
% iwsettaskfilecomment 1200 images/homebase.gif "Great image of home
base."

Interwoven, Inc. 200


Chapter 3: Development Tools

iwsettaskownerandarea
Assigns an owner and workarea to a TeamSite task.

Man Page Group

Workflow/Job.

Usage
iwsettaskownerandarea [-h] [-v] [-s servername] taskid owner areavpath

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
taskid ID of task to change.
owner New owner for task.
areavpath New vpath for task.

Example
% iwsettaskownerandarea 1200 root /default/main/web/WORKAREA/users

TeamSite Command-Line Tools 201


Chapter 3: Development Tools

iwsettasktimeout
Changes the timeout value on an inactive task that already has a timeout successor
specified in the original job specification.

Man Page Group

Workflow/Job.

Usage
iwsettasktimeout [-h|-v] [-s servername] taskid timeout

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
taskid ID of task to change.
timeout New timeout value (using the format: +HHHHMM or
MMDDYYYYHHMM).

Examples
% iwsettasktimeout 1200 +002400
% iwsettasktimeout 1200 122520020600

Interwoven, Inc. 202


Chapter 3: Development Tools

iwsrchattrib
Displays an XML formatted list of indexed extended attributes or FormsPublisher
templating attributes.

Man Page Group

Search and Index.

Usage
iwsrchattrib [-h|-v|-e|-t template_data_type]

-h Displays usage message.


-v Displays version.
-e Displays the extended attribute list (default).
-t Displays the templating attribute list.
template_data_typ Specifies the path of the template data type (as determined by
e the data_category/data_type directory structure used by
FormsPublisher).

Examples
% iwsrchattrib -t iw-home/examples/Templating/templatedata/internet/pr

Returns a list of indexed attributes for the FormsPublisher pr data type (residing in the
internet data category).

% iwsrchattrib -e

Returns a list of all extended attributes registered with the index manager, such as:
<attr>
<name>Indexed</name>
<type>int</type>
</attr>

<attr>
<name>TeamSite/Templating/PrimaryDocumentType</name>
<type>string</type>
</attr>

<attr>
<name>TeamSite/Templating/PrimaryDCR</name>
<type>string</type>
</attr>

TeamSite Command-Line Tools 203


Chapter 3: Development Tools

<attr>
<name>OwningAreaId</name>
<type>long</type>
</attr>

<attr>
<name>AreaRelativePath</name>
<type>string</type>
</attr>

<attr>
<name>TeamSite/Templating/DCR/Type</name>
<type>string</type>
</attr>

<attr>
<name>BranchId</name>
<type>long</type>
</attr>

<attr>
<name>CreateDate</name>
<type>date</type>
</attr>

<attr>
<name>IndexedDate</name>
<type>date</type>
</attr>

<attr>
<name>Creator</name>
<type>string</type>
</attr>

<attr>
<name>LastModifier</name>
<type>string</type>
</attr>

<attr>
<name>Version</name>
<type>int</type>
</attr>

<attr>
<name>Size</name>
<type>int</type>
</attr>

Interwoven, Inc. 204


Chapter 3: Development Tools

<attr>
<name>LastModifiedDate</name>
<type>date</type>
</attr>

<attr>
<name>Title</name>
<type>string</type>
</attr>

TeamSite Command-Line Tools 205


Chapter 3: Development Tools

iwsrchgethome
Displays the location of the search home directory.

Man Page Group

Search and Index.

Usage
iwsrchgethome [-h|-v]

-h Displays usage message.


-v Displays version.

Example
% iwsrchgethome

Returns:
>$G:\Interwoven\search\output\nti86.DEV\src\tests\java\dummy.

Interwoven, Inc. 206


Chapter 3: Development Tools

iwsrchgetpage
Displays a page of results from a query previously performed by iwsrchquery.

Man Page Group

Search and Index.

Usage
iwsrchgetpage [-h|-v]
iwsrchgetpage userID queryID start page_size

-h Displays usage message.


-v Displays version.
userID Specifies a valid TeamSite user ID.
queryID Specifies the value of <query_id> as returned by the
previously performed query.
start Specifies the index of the first query result to return (that is,
the starting point for returning query results)
page_size Specifies the number of returned query results per page.

Example
% iwsrchgetpage AJUBA\user1 CMQB9ZZ4 5 5

Returns a results page from query ID CMQB9ZZ4 starting at result index 5 and containing
up to 5 query results (although in this case there were only 2 matching results, so only 2
are displayed). The user has the valid TeamSite ID user1 on the AJUBA domain. Results
could appear as follows:
<data>
<query_id>CMQB9ZZ4</query_id>
<result>
<vpath>//jzhuangd2ks/default/main/STAGING/Copy (3) of
test1.txt</vpath>
<rank>5000.0</rank>
</result>
<result>
<vpath>//jzhuangd2ks/default/main/STAGING/Copy (2) of
test1.txt</vpath>
<rank>5000.0</rank>
</result>
<return_code>0</return_code>
</data>

TeamSite Command-Line Tools 207


Chapter 3: Development Tools

Notes
„ To display, for example, 500 results in 50-result blocks, enter values as follows for
start and page_size in consecutive iwsrchgetpage commands:
0 50
50 50
100 50
150 50
and so on.
„ The value shown in <rank> is the document hit score. It can range from 0 to 10000,
with higher values representing more hits.

Interwoven, Inc. 208


Chapter 3: Development Tools

iwsrchmgrping
Pings the search manager and displays response time.

Man Page Group

Search and Index.s

Usage
iwsrchmgrping [-h|-v]

-h Displays usage message.


-v Displays version.

Example

% iwsrchmgrping

Returns:
The response time for search manager is: 15 ms

TeamSite Command-Line Tools 209


Chapter 3: Development Tools

iwsrchmgrstop
Sends a shutdown command to the search manager.

Man Page Group

Search and Index.

Usage
iwsrchmgrstop [-h|-v]

-h Displays usage message.


-v Displays version.

Example
% iwsrchmgrstop

stops the search manager. This command does not display a return message.

NOTE
This command does not verify that the search manager shut down successfully. Check
the list of processes to verify search manager status.

Interwoven, Inc. 210


Chapter 3: Development Tools

iwsrchndxstatus
Displays the current index status from the search manager for all indexed branches or a
list of specified branches. Output is in XML format.

Man Page Group

Search and Index.

Usage
iwsrchndxstatus [-h|-v] -a [-f]
iwsrchndxstatus [-f] branchpath1 branchpath2 ...

-h Displays usage message.


-v Displays version.
-a Displays the index status for all full- and partially-indexed
branches.
-f Generates output in a more readable format instead of the default
XML format.
branchpath1... Displays the index status for specified branch(es).

Examples
% iwsrchndxstatus /default/main

Returns the index status of the /default/main branch on the search manager (similar to
the following):
<branch_index_status_list>
<branch_index_status>
<branch>
<serverid>010000000000000051000000</serverid>
<archiveid>640000000000000020200000</archiveid>
<branchid>0C0100000000000050220000</branchid>
</branch>
<vpath>/default/main</vpath>
<status>11</status>
<last_indexed_edition>testEdition1</last_indexed_edition>
<last_indexed_edition_creation_time>1089325560000</
last_indexed_edition_creation_time>
<workarea_index_status>TRUE</workarea_index_status>
<collection_list>
<collection>0100000000000000510000006400000000000000202000000C010000000
0000050220000_1</collection>
</collection_list>
</branch_index_status>
</branch_index_status_list>

TeamSite Command-Line Tools 211


Chapter 3: Development Tools

% iwsrchndxstatus -a

Returns the index status of all indexed branches as known to the search manager.

Notes
„ If the value inside the <last_index_edition> element starts with # (for example,
#4), the edition is most likely anonymous.

„ Values used in the <status> element are as follows:


10: Not indexed
11: Indexed
12: Partially indexed

Interwoven, Inc. 212


Chapter 3: Development Tools

iwsrchndxstatuschg
Instructs the search manager to get the latest status of all the indexed branches from the
search manager.

Man Page Group

Search and Index.

Usage
iwsrchndxstatus [-h|-v]

-h Displays usage message.


-v Displays version.

Examples

% iwsrchndxstatuschg

Returns:
Success.

NOTE
Under normal circumstances, the index manager automatically notifies the search
manager of any index changes. This CLT is provided as a manual way of performing
that task in case the index manager is brought down or fails after it has indexed a branch
but before it can notify the search manager of the changes.

TeamSite Command-Line Tools 213


Chapter 3: Development Tools

iwsrchquery
Executes a query on the search manager and returns the first page of the query in XML
format. Use iwsrchgetpage to display additional pages.

Man Page Group

Search and Index.

Usage
iwsrchquery [-h|-v]
iwsrchquery [-s] [-f queryStrFile] userID pageSize branchpath areapath

-h Displays usage message.


-v Displays version.
-s Performs schema validation.
-f Specifies a query string in a file. You are prompted for a query if
you execute iwsrchquery without setting this option.
queryStrFile Specifies the name of the query string file.
userID Specifies a valid TeamSite user ID.
pageSize Specifies the number of returned query results per page.
branchpath Specifies the path of the branch to which the query is applied.
areapath Specifies the TeamSite area to which the query is applied. This
can be an absolute path or a path relative to the branch.

Examples
% iwsrchquery -f C:\queries\query1.txt AJUBA\user1 5
\\server1\default\main \\server1\default\main\STAGING

Returns the first page (containing up to 5 query results) resulting from the query defined
in the file C:\queries\query1.txt. The user has the valid TeamSite ID user1 on the
AJUBA domain. The query is applied to the staging area on the default\main branch of
the system server1. The query defined in query1.txt could appear as follows:
<predicate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="TeamSiteSearch.xsd">
<accrue>
<fulltext-any>
<term>vdk</term>
</fulltext-any>
<fulltext-any>
<term>modified</term>
</fulltext-any>
</accrue>
</predicate>

Interwoven, Inc. 214


Chapter 3: Development Tools

Depending on the contents of the staging area, output similar to the following is
displayed:
<data>
<query_id>CMQB9ZZ4</query_id>
<result>
<vpath>//jzhuangd2ks/default/main/STAGING/test1.txt</vpath>
<rank>5000.0</rank>
</result>
<result>
<vpath>//jzhuangd2ks/default/main/STAGING/Copy of test1.txt</vpath>
<rank>5000.0</rank>
</result>
<result>
<vpath>//jzhuangd2ks/default/main/STAGING/Copy (6) of
test1.txt</vpath>
<rank>5000.0</rank>
</result>
<result>
<vpath>//jzhuangd2ks/default/main/STAGING/Copy (5) of
test1.txt</vpath>
<rank>5000.0</rank>
</result>
<result>
<vpath>//jzhuangd2ks/default/main/STAGING/Copy (4) of
test1.txt</vpath>
<rank>5000.0</rank>
</result>
<return_code>0</return_code>
</data>

% iwsrchquery AJUBA\user1 5 \\server1\default\main


\\server1\default\main\STAGING

In this example no query file is specified, so you are prompted to enter a query:
Please enter the query below. Press Ctrl+C to quit.

Enter the query on the command line. If you enter it as shown in the preceding example
(the contents of query1.txt), the output displayed is identical to the output shown in
preceding example. To run a query that you enter on the command line, press return
after entering </predicate>. The command recognizes that that is the end of the query
and executes the query immediately.

Notes
„ The schemas are described in this manual in Appendix D, “Search Query Schemas.”
„ Performing schema validation with the -s option increases search response time.
„ Use iwsrchgetpage to view additional query result pages. Use the ID specified by
<query_id> in the first page’s output to specify the query in iwsrchgetpage.

TeamSite Command-Line Tools 215


Chapter 3: Development Tools

„ The value shown in <rank> is the document hit score. It can range from 0 to 10000,
with higher values representing more hits.
„ If queryStrFile contains multi-byte characters, it needs to be saved in UTF-8
encoding for the CLT to run properly.

Interwoven, Inc. 216


Chapter 3: Development Tools

iwsubmit
Submits any TeamSite workarea, file, or directory to the staging area. For a full
description of submitting files to the staging area, see the ContentCenter online help.

Man Page Group

Workarea Operation.

Usage
iwsubmit [-h|-v] [-s] [-w|-x] [-u] [-r] [-c global_comment]
[-i info_comment] {vpath file_comment}+

iwsubmit [-h] [-v] [-s] [-w|-x] [-u] [-r] [-c global_comment]


[-i info_comment] -f file_name

-c global_comment Comment to attach to the submit event.


-i info_comment Second comment to attach to the submit event.
vpath One or more vpaths to a file, directory, or workarea (see
page 15).
file_comment Comment to attach to the file, directory, or workarea specified.
-f file_name File from which to read the vpath and file_comment. Use
newline to separate vpath and file_comment). If file_name is -,
the information is read from stdin.

Flags

-h Displays usage message.


-v Displays version.
-s Skips conflicts and locked files.
-w Overwrites all files. Files in STAGING but not in src_area are
deleted.
-x Overwrites conflicts.
-u Unlocks locked files.
-r Reports on submitted files.

Example
% iwsubmit -w -u -c 'updated support info' -i 'keyword'
main/WORKAREA/andre/htdocs/index.html 'added imagemap'

Submits the file index.html to the staging area, with the comment “added imagemap”
attached to the file. The comments for the submit operation are “updated support info”
and “keyword”. If index.html is locked, this operation will unlock it. If the version in
the staging area is newer, this operation will overwrite it.

TeamSite Command-Line Tools 217


Chapter 3: Development Tools

iwtaketask
Assigns a shared task to a specified user.

Man Page Group

Workflow/Job.

Usage
iwtaketask [-h|-v] [-s servername] taskID username

-h Displays usage message.


-v Displays version.
-s servername Specifies the server on which the job is instantiated. Server
names can be specified by name or IP address.
taskID Specifies the task that will be assigned. Task IDs are represented
as integers.
username Specifies the user who will receive the task assignment.

Example

The following command assigns task 7734 on the server production.example.com to


user Andre:
% iwtaketask -s production.example.com 7734 Andre

Interwoven, Inc. 218


Chapter 3: Development Tools

iwtaskselect
Marks a usertask finished and chooses which <successorset/> element to signal.

Man Page Group

Workflow/Job.

Usage
iwtaskselect [-h|-v] [-s servername] taskID choice [comment]

-h Displays usage message.


-v Displays version.
-s servername Specifies the server on which the job is instantiated. Server
names can be specified by name or IP address.
taskID Specifies the task that will be marked finished. Task IDs are
represented as integers.
choice Specifies the index (starting from 0) of the <successorset/>
element in the <successors/> section of the task's configuration.
comment Optional comment.

Example

The following command marks task 7734 done on the server production.example.com
and signals the third <successorset/> element in that task’s <successors/> section:
% iwtaskselect -s production.example.com 7734 2

TeamSite Command-Line Tools 219


Chapter 3: Development Tools

iwtaskvariable
Creates, deletes, sets, and retrieves values of variables on a TeamSite task.

Man Page Group

Workflow/Job.

Usage
iwtaskvariable [-h|-v] [-q] [-s servername] (-g name|-c key value|-t key
value|-d key value) taskid

-h Displays usage message.


-v Displays version.
-q Suppress all error messages.
-s servername Use servername as TeamSite server.
-g name Get variable.
-c key value Create variable.
-t key value Set variable.
-d key value Delete variable.
taskid Workflow ID number.

Example
% iwtaskvariable -c superhero Spider-Man 111

Creates a task variable with the key “superhero” and the value “Spider-Man” in task
111.

Interwoven, Inc. 220


Chapter 3: Development Tools

iwundochoice
When a user chooses a transition from a usertask or grouptask, that choice can be taken
back. iwundochoice reverses one such task. The iwundochoice CLT cannot reverse a
transition for a task with multiple successors.

Man Page Group

Workflow/Job.

Usage
iwundochoice [-h|-v] [-s servername] taskID

-h Displays usage message.


-v Displays version.
-s servername Specifies the server on which the job is instantiated. Server
names can be specified by name or IP address.
taskID Specifies the task that was active prior to the transition. Task IDs
are represented as integers.

Example

The following command reverses the transition from task 7734 on the server
production.example.com:
% iwundochoice -s production.example.com 7734

TeamSite Command-Line Tools 221


Chapter 3: Development Tools

iwunlock
Unlocks any file or directory in any TeamSite workarea. See the ContentCenter online
help for a full description of unlocking files.

Man Page Group

Workarea Operation.

Usage
iwunlock [-h|-v] vpath

-h Displays usage message.


-v Displays version.
vpath Specifies a vpath to a file.

Example
% iwunlock main/branch1/WORKAREA/wa1/index.html

Unlocks the file index.html in the workarea wa1 on the subbranch branch1. Only one
file may be unlocked at a time with this command.

Interwoven, Inc. 222


Chapter 3: Development Tools

iwuntaketask
Removes the ownership of an active group task.

Man Page Group

Workflow/Job.

Usage
iwuntaketask [-h|-v] [-s servername] taskID

-h Displays usage message.


-v Displays version.
-s servername Use servername as TeamSite server.
taskID ID of task to change.

Example
% iwuntaketask 1250

where 1250 is a grouptask of which someone has already taken ownership (by either
using the GUI, or the iwtaketask CLT).

TeamSite Command-Line Tools 223


Chapter 3: Development Tools

iwupdate
Updates any TeamSite file, directory, or workarea with the latest version of any file
system element. This command acts like the Copy To or (if vpath_from specifies the
staging area on that branch) the Get Latest command. See the ContentCenter online
help for more information about these commands.

Man Page Group

Workarea Operation.

Usage
iwupdate [-h|-v] [-w|-x|-s] [-o] [-r] {src_vpath}+ dst_vpath

iwupdate [-h|-v] [-w|-x|-s] [-o] [-r] [-f vpath_file] dst_vpath

Where src_vpath specifies a path to a file, directory, or area and dst_vpath specifies a
path to a workarea (dst_vpath may specify a path to a file or directory in a workarea if
the area-relative portions of dst_vpath and src_vpath are the same).

-h Displays usage message.


-v Displays version.
-w Overwrites all files. Files in dst_area but not in src_area are
deleted.
-x Overwrites all conflicts.
-s Overwrites all versioned files.
-o Directory update conflicts return success.
-r Reports on updated files.
-f Reads source vpaths from the file vpath_file (if vpath_file
is -, STDIN will be read).
src_vpath Specifies a path to a file, directory, or area.
dst_vpath Specifies a path to a workarea (dst_vpath may specify a path to
a file or directory in a workarea if the area relative portions of
dst_vpath and src_vpath are the same).

Example
% iwupdate -x main/branch1/WORKAREA/wa1 main/branch1/WORKAREA/wa2

copies all the files that are different in workarea wa1 to workarea wa2, overriding any
conflicts.

Interwoven, Inc. 224


Chapter 3: Development Tools

iwvpath
Prints all or parts of the version path of the specified object.

Man Page Group

General Development.

Usage
iwvpath [-h|-v] [-p|-b|-d|[-s][-a]] objectvpath
iwvpath [-h|-v] [-p|-b|-d|[-s][-a]] -o objid

-h Displays usage message.


-v Displays version.
-p Prints the components of the version path in separate lines:
<server>
<archive>
<branch>
<area-type>
<area-name>
<directory-path>
where <area-type> is WORKAREA, STAGING, or EDITION
-b Prints the branch relative vpath only (see page 15).
-d Prints the directory path only (see page 15).
-s Includes the server as part of the vpath.
-a Prints the area vpath (rooted at the archive) (see page 15).
objectvpath Vpath of any TeamSite object (see page 15).
-o objid Objid of any TeamSite object (see page 18).

Examples
% iwvpath -d main/WORKAREA/andre/htdocs/index.html

Returns:
/htdocs/index.html

% iwvpath -p -c fse -o 0x0000007b0000007d00000093 //IWSERVER/default

Returns:
chocolate
default
/main
WORKAREA
andre
/htdocs/index.html

TeamSite Command-Line Tools 225


Chapter 3: Development Tools

% iwvpath -b -c fse -o 0x0000007b0000007d00000093 //IWSERVER/default

Returns:
/main

% iwvpath -d -c fse -o 0x0000007b0000007d00000093 //IWSERVER/default

Returns:
/htdocs/index.html

Interwoven, Inc. 226


Chapter 3: Development Tools

TeamSite Command-Line Tools 227


Chapter 3: Development Tools

Interwoven, Inc. 228


Chapter 3: Development Tools

TeamSite Command-Line Tools 229


Chapter 3: Development Tools

Interwoven, Inc. 230


Chapter 3: Development Tools

TeamSite Command-Line Tools 231


Chapter 3: Development Tools

Interwoven, Inc. 232


Chapter 3: Development Tools

TeamSite Command-Line Tools 233


Chapter 3: Development Tools

Interwoven, Inc. 234


Chapter 3: Development Tools

TeamSite Command-Line Tools 235


Chapter 3: Development Tools

Interwoven, Inc. 236


Chapter 4

Command Triggers

This chapter describes how to:


„ Configure command triggers to run as services.
„ Start and stop command triggers that have been set up to run as services.

This chapter also contains man pages for all supported command triggers. All man
pages in this chapter are presented as one group, arranged alphabetically:

Table 24 Command trigger tools


Trigger Description See...
iwat Registers an event handler for events that do not have a page 232
specific command trigger.
iwatcreate Triggers a custom script each time a file or a directory is page 235
created.
iwatlock Triggers a custom script each time a file or a directory is page 236
locked.
iwatmkbr Triggers a custom script each time a new branch is page 237
created.
iwatmkwa Triggers a custom script each time a new workarea is page 238
created.
iwatpub Triggers a custom script each time a new edition is page 239
published.
iwatrmbr Triggers a custom script each time a branch is deleted. page 240
iwatrmed Triggers a custom script each time an edition is deleted. page 241
iwatrmwa Triggers a custom script each time a workarea is deleted. page 242
iwatserver Triggers a custom script each time a StartUp, ShutDown, page 243
Freeze, Thaw, or DiskLow event occurs.
iwatsub Triggers a custom script each time a file or a directory is page 244
submitted.
iwatunlock Triggers a custom script each time a file or a directory is page 245
unlocked.
iwatupdate Triggers a custom script each time a Copy To or Get page 246
Latest update event occurs.
iwlsat Lists registered iwat programs. page 247
iwrmat Removes registered iwat programs. page 248

TeamSite Command-Line Tools 227


Chapter 4: Command Triggers

Starting Command Triggers


TeamSite command triggers run custom scripts whenever certain events occur in the
TeamSite system. For example, the iwatpub trigger can be configured to execute an
email notification script when an edition is published. Each trigger that is invoked tails
the event log and responds to different events. See Appendix B, “Sample Command
Trigger Scripts,” for script examples.

NOTE
Not all events are logged by default in the event log. If an iwat command relies on an
event being logged, and if TeamSite is not configured to log that event, the iwat
command will fail or not run properly. For example, the iwatcreate command looks for
CreateFSE events in the event log. However, CreateFSE events are logged only if you
set log_modifyfse=yes in the iwserver section of the iw.cfg file.

Because they are non-terminating, command triggers are usually included in a script that
starts and stops the process and its tail.

By default, the iwat command triggers invoke user scripts synchronously. That is, they
wait for the scripts to return before handling the next event. You can use the syntax
shown in the following example to configure an iwat trigger to run a script
asynchronously:
iwatserver.ipl "progname progargs ... &"

NOTE
The ampersand is inside the quotation marks that encase the command. This prevents
the shell from running iwatserver itself in the background. As coded above, progname
runs in the background when executed. The iwatserver command trigger is just used as
an example here. You can use this syntax with any iwat command trigger.

To configure the triggering of custom scripts, you must set up


iw-home/local/iwlocal.cfg. First, determine which command trigger to use (for
example, if you want to trigger an event whenever an edition is published, use the
iwatpub command trigger). You also need to know which user the custom script needs
to run as, and the name of the custom script (note: this user must have read permissions
to iwevents.log). The default location for custom scripts is in iw-home/local.

iw-home/local/iwlocal.cfg consists of one or more tab-delimited lines, each of the


form:
trigger user script

Here is a sample iwlocal.cfg file:


#IWATPROG USER COMMAND LINE (default loc. in $IW_HOME/local)
iwatpub root program_to_run_on_publish
iwatsub root program_to_run_on_submission

You now need to log in as root, and stop and start /etc/init.d/iw.local:

Interwoven, Inc. 228


Chapter 4: Command Triggers

% cd /etc/init.d

% ./iw.local stop

% ./iw.local start

iw.local will reread the configuration file and start the command triggers as specified.

TeamSite Command-Line Tools 229


Chapter 4: Command Triggers

Environment Variables
When using command triggers, environment variables are set before the program
progname is run. The events and their values are described under the appropriate
command trigger in the following table. Note that some of the events listed in the Event
column do not result in IW_EVENT being set. Because those events also do not have a
command trigger to control the setting of any environment variables, no value is shown
for them in the Command Trigger column. For example, the DeleteEA event does not
set the IW_EVENT variable, and there is no corresponding command trigger to perform
that setting. To make DeleteEA set IW_EVENT, you would have to write a custom script
and then register the event and script through the iwat command.

Values shown in the Event column are the strings used both internally and on the
command line for the corresponding event. If the event has a value in the Command
Trigger column, the string in the Event column is also the value to which the command
trigger sets IW_EVENT. All events, including those without an entry in the Command
Trigger column, can be monitored using iwat.

Table 25 Command triggers and TeamSite events


Command
Event Description
Trigger
CreateBranch A branch has been created iwatmkbr

CreateEA A new EA has been added to a file


CreateFSE An FSE (file/directory/symlink) has iwatcreate
been created
CreateWorkarea A workarea has been created iwatmkwa

DeleteEA An extended attribute (EA) has been deleted


from a file
DestroyBranch A branch has been deleted iwatrmbr

DestroyEdition An edition has been deleted iwatrmed

DestroyFSE An FSE has been deleted


DestroyWorkarea A workarea has been deleted iwatrmwa

DiskFail An I/O error has occurred on the disk(s) iwatserver


containing the backing store
DiskLow The disks containing the backing store are iwatserver
running low on space
Freeze The server has been frozen (iwfreeze) iwatserver

Lock A file or directory has been locked iwatlock

MarkDoneFile A file has been marked as “done”


ModifyFSE An FSE has been modified
PublishStagingArea A new edition has been published from iwatpub
the staging area
ReassignFile A file has been reassigned
RejectFile A file has been reject

Interwoven, Inc. 230


Chapter 4: Command Triggers

Table 25 Command triggers and TeamSite events (Continued)


Command
Event Description
Trigger
RenameBranch A branch has been renamed
RenameFSE An FSE has been renamed
RenameWorkarea A workarea has been renamed
ResetConfig TeamSite has been asked to reload its
configuration files (iwreset)
SetEA An EA has been added to/modified on a file
ShutDown The server has been shut down iwatserver

Startup The server has been started iwatserver

Submit A file or directory has been submitted iwatsub

SyncDestroy A file with EAs has been deleted


SyncModify A file with EAs has been modified
SyncRevert A file with EAs has reverted to an earlier
version
Thaw The server has been unfrozen (thawed) iwatserver

TruncateEA An existing EA has been modified on a file


UnassignFile A file has been unassigned
Unlock A file or directory has been unlocked iwatunlock

Update A file or directory has been updated iwatupdate

WriteEA An EA on a fiel was writen to. Multiple


WriteEA events are followed by a SetEA
event

TeamSite Command-Line Tools 231


Chapter 4: Command Triggers

iwat
This program is used to register an event handler for events that do not have a specific
command trigger program.

Usage
iwat [-h|-v] [-s servername] eventpattern program

-h Displays usage message.


-v Displays version.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the
current TeamSite server.
eventpattern A regular expression to match complete iwevents.log lines.
program The program to run when the event matches the
eventpattern regular expression.

Example
% iwat CreateWorkarea /usr/ucb/echo

Interwoven, Inc. 232


Chapter 4: Command Triggers

iwat-env
This program is used for testing the command triggers. It returns a list of environment
variables for the command trigger, and their current states.

Usage:
iwat-env [-h|-v] progargs...

-h Displays usage message.


-v Displays version.

Examples:
% iwat-env

lists the names of all environment variables:


iwat-env: ==========================================================
iwat-env: IW_EVENT =
iwat-env: IW_SUBMITID =
iwat-env: IW_AREA =
iwat-env: IW_ASSIGNEE =
iwat-env: IW_BRANCH =
iwat-env: IW_COMMENTS =
iwat-env: IW_EDITION =
iwat-env: IW_EVENTLINE =
iwat-env: IW_EVENTROLE =
iwat-env: IW_EVENTUSER =
iwat-env: IW_FILE =
iwat-env: IW_FILEPATH =
iwat-env: IW_OBJID =
iwat-env: IW_STAGINGAREA =
iwat-env: IW_TIMESTAMP =
iwat-env: IW_VPATH =
iwat-env: IW_WORKAREA =
iwat-env: ==========================================================
% iwatasgn iwat-env

will return (as soon as a file is assigned) output that looks like this:
iwat-env: ==========================================================
iwat-env: IW_EVENT = AssignFile
iwat-env: IW_SUBMITID =
iwat-env: IW_AREA = /default/main/WORKAREA/andre
iwat-env: IW_ASSIGNEE = pat
iwat-env: IW_BRANCH =
iwat-env: IW_COMMENTS = Locked by launching edit
iwat-env: IW_EDITION =

TeamSite Command-Line Tools 233


Chapter 4: Command Triggers

iwat-env: IW_EVENTLINE = [Fri Aug 25 15:34:41 2000] pat author


AssignFile /default/main/WORKAREA/andre/htdocs/about.html
0x0000007b0000007d00000994 pat Locked by launching edit
iwat-env: IW_EVENTROLE = author
iwat-env: IW_EVENTUSER = pat
iwat-env: IW_FILE =
/default/main/WORKAREA/andre/htdocs/about.html
iwat-env: IW_FILEPATH = /htdocs/about.html
iwat-env: IW_OBJID = 0x0000007b0000007d00000994
iwat-env: IW_STAGINGAREA =
iwat-env: IW_TIMESTAMP = Fri Apr 25 15:34:41 2000
iwat-env: IW_VPATH = /default/main/WORKAREA/andre
iwat-env: IW_WORKAREA = /default/main/WORKAREA/andre
iwat-env: ==========================================================

Interwoven, Inc. 234


Chapter 4: Command Triggers

iwatcreate
iwatcreate is a non-terminating script that executes the custom script progname once
each time a file or a directory has been created.

Usage
iwatcreate [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “CreateFSE”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_FILE vpath of file (rooted at the archive).

TeamSite Command-Line Tools 235


Chapter 4: Command Triggers

iwatlock
iwatlock is a non-terminating script that executes the custom script progname once each
time a file or a directory is locked.

Usage
iwatlock [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “Lock”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_FILE vpath of file (rooted at the archive).
IW_EDITOR Workarea owner.

Interwoven, Inc. 236


Chapter 4: Command Triggers

iwatmkbr
iwatmkbr is a non-terminating script that executes the custom script progname once each
time a new branch is created.

Usage
iwatmkbr [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “CreateBranch”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_BRANCH vpath of branch (rooted at the archive).

TeamSite Command-Line Tools 237


Chapter 4: Command Triggers

iwatmkwa
iwatmkwa is a non-terminating script that executes the custom script progname once each
time a new workarea is created.

Usage
iwatmkwa [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “CreateWorkarea”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_WORKAREA vpath of workarea (rooted at the archive).

Interwoven, Inc. 238


Chapter 4: Command Triggers

iwatpub
iwatpub is a non-terminating script that executes the custom script progname once each
time a new edition is published.

Usage
iwatpub [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “PublishStagingArea”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_EDITION vpath of edition (rooted at the archive).
IW_STAGINGAREA Version path of the staging area published.
IW_WORKAREA Version path of the workarea published.

TeamSite Command-Line Tools 239


Chapter 4: Command Triggers

iwatrmbr
iwatrmbr is a non-terminating script that executes the custom script progname once each
time a branch is deleted.

Triggers an event (custom script) upon removal of a branch.

Usage
iwatrmbr [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “DestroyBranch”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_BRANCH vpath of branch (rooted at the archive).

Interwoven, Inc. 240


Chapter 4: Command Triggers

iwatrmed
iwatrmed is a non-terminating script that executes the custom script progname once each
time an edition is deleted.

Usage
iwatrmed [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “DestroyEdition”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_EDITION vpath of edition (rooted at the archive).

TeamSite Command-Line Tools 241


Chapter 4: Command Triggers

iwatrmwa
iwatrmwa is a non-terminating script that executes the custom script progname once each
time a workarea is deleted.

Usage
iwatrmwa [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “DestroyWorkarea”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_WORKAREA vpath of workarea (rooted at the archive).

Interwoven, Inc. 242


Chapter 4: Command Triggers

iwatserver
The iwatserver CLT is a non-terminating script that executes progname once each time
after one of the following events has occurred: StartUp, ShutDown, Freeze, Thaw,
DiskLow, DiskFail, ActivateStore, DeactivateStore, OutOfMemory.

Usage
iwatserver [-h|-p|-v] progname progargs

-h Prints usage message.


-p Prints the process ID before starting.
-v Prints the version string.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before progname
is run:

IW_EVENT One of the events: StartUp, ShutDown, Freeze, Thaw, DiskLow,


or DiskFail.
IW_TIMESTAMP The time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role that IW_EVENTUSER was in during the operation.
IW_COMMENTS Comments associated with the event.

TeamSite Command-Line Tools 243


Chapter 4: Command Triggers

iwatsub
iwatsub is a non-terminating script that executes the custom script progname once each
time a file or a directory is submitted.

Triggers an event (custom script) upon submission of any file system element.

Usage
iwatsub [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “Submit”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTLINE Copy of the line from the event log that originally triggered the
event.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_WORKAREA vpath of workarea (rooted at the archive) (same as IW_AREA and
IW_VPATH).
IW_SUBMITID objid associated with the submit event.
IW_EDITOR Workarea owner.

Interwoven, Inc. 244


Chapter 4: Command Triggers

iwatunlock
iwatunlock is a non-terminating script that executes the custom script progname once
each time a file or a directory is unlocked.

Usage
iwatunlock [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “Unlock”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_FILE vpath of file (rooted at the archive).
IW_EDITOR Workarea owner.

TeamSite Command-Line Tools 245


Chapter 4: Command Triggers

iwatupdate
iwatupdate is a non-terminating script which executes the custom script progname once
each time a Copy To or Get Latest update event occurs.

Triggers a custom script each time.

Usage
iwatupdate [-h|-v] [-p] progname progargs...

-h Displays usage message.


-v Displays version.
-p Prints process ID before starting.
progname Custom script to be executed.
progargs Arguments to progname.

The following environment variables are set (to the described values) before the
program progname is run:

IW_EVENT “Update”
IW_TIMESTAMP Time when the event occurred.
IW_EVENTUSER Username of person who performed the operation.
IW_EVENTROLE Role IW_EVENTUSER was in during the operation.
IW_WORKAREA Version path of workarea (rooted at the archive).
IW_UPDATEID objid associated with the update event.
IW_EDITOR Workarea owner.

Interwoven, Inc. 246


Chapter 4: Command Triggers

iwlsat
iwlsat lists registered iwat programs, their IDs, and their event regular expressions.

Usage
iwlsat [-h|-v] [-s servername]

-h Displays usage message.


-v Displays version.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the current
TeamSite server.

Example
% iwlsat

displays the following output:


ID: 1234 “CreateWorkarea” /usr/ucb/echo

TeamSite Command-Line Tools 247


Chapter 4: Command Triggers

iwrmat
iwrmat unregisters programs that have been added using the iwat command.

Usage
iwrmat [-h|-v] [-s servername] ID

-h Displays usage message.


-v Displays version.
-s servername Specifies the TeamSite server to which to connect. It can be
specified by name or IP address. The default value is the current
TeamSite server.
ID The ID number of the iwat program to unregister.

Example
% iwrmat 1234

Interwoven, Inc. 248


Appendix A

Master List

The following is an alphabetized master list of all the CLTs and command triggers
described in this manual:

Table 26 CLT alphabetized master list


CLT/Trigger Description See...
iwabort Provides a method for terminating a page 24
long-running server operation.
iwaccess Controls TeamSite user permissions. page 25
iwaccessmigrate Applies user and group permission settings page 30
for configurable roles and delegated
administration.
iwaddtaskfile Adds a file to a job task that is part of a job page 102
instance already created on the TeamSite
server.
iwaddtaskgroup Adds groups to group tasks. page 103
iwaddtaskuser Adds users to tasks. page 104
iwadduser Adds a user to TeamSite role files. page 33
iwancestor Displays the vpath of the common ancestor page 34
of the specified files.
iwat Registers an event handler for events that do page 232
not have a specific command trigger.
iwat-env Used for testing the command triggers. page 233
iwatcreate Triggers a custom script each time a file or a page 235
directory is created.
iwatlock Triggers a custom script each time a file or a page 236
directory is locked.
iwatmkbr Triggers a custom script each time a new page 237
branch is created.
iwatmkwa Triggers a custom script each time a new page 238
workarea is created.
iwatpub Triggers a custom script each time a new page 239
edition is published.
iwatrmbr Triggers a custom script each time a branch page 240
is deleted.
iwatrmed Triggers a custom script each time an edition page 241
is deleted.

TeamSite Command-Line Tools 249


Appendix A: Master List

Table 26 CLT alphabetized master list (Continued)


iwatrmwa Triggers a custom script each time a page 242
workarea is deleted.
iwatserver Triggers a custom script each time a page 243
StartUp, ShutDown, Freeze, Thaw, or
DiskLow event occurs.
iwatsub Triggers a custom script each time a file or a page 244
directory is submitted.
iwattrib Returns metadata information on any object page 105
in the TeamSite server, including all
branches, workareas, editions, staging areas,
files, directories, and symlinks.
iwatunlock Triggers a custom script each time a file or a page 245
directory is unlocked.
iwatupdate Triggers a custom script each time an update page 246
event occurs (Copy or Get Latest).
iwauthen Authenticates the user (by username) by page 113
checking the corresponding password.
iwcallback Tells the TeamSite server that the program page 115
corresponding to an external or cgi task is
finished. Passes a return code to the server.
iwcat Displays any version of a (text) file in page 116
TeamSite.
iwchgrp Changes the group of a TeamSite workarea page 35
or branch.
iwckrole Checks whether or not a user can log in with page 117
a particular role.
iwcmp Compares any two TeamSite areas and page 118
returns a list of differences.
iwconfig Reads or writes to TeamSite’s main page 36
configuration file.
iwconfigtsreport Sets TeamSite Reporting parameters in the page 37
tsreport.xml file. Parameters include
database type, port, server, user, password,
license key, and other items.
iwconvertserver Supports the backing store conversion GUI page 39
by communicating with remote TeamSite
servers and invoking iwconvert on behalf of
the GUI.
iwcp Copies files. page 120
iwdecode Decodes HTML-encoded %xx lines to page 121
ASCII lines.
iwdelcp Automatically propagates differences page 122
between any two editions to another file
system location.
iwdeltaskfile Deletes a file that is attached to a TeamSite page 124
task.

Interwoven, Inc. 250


Appendix A: Master List

Table 26 CLT alphabetized master list (Continued)


iwdiffapply Synchronizes any two file system page 125
directories.
iwdiffdir Lists all incremental file system changes page 126
needed to make a directory in a workarea
look like its counterpart directory in another
workarea, staging area, or edition.
iwencode Encodes ASCII lines to HTML-encoded page 127
%xx lines.
iwevents Returns a history of submissions or updates page 128
of a workarea.
iwextattr Sets extended attributes on a file. page 131
iwfilestate Displays details about a file in a TeamSite page 133
workarea, edition, or staging.
iwfreeze Freezes and unfreezes all system writes. page 40
iwfsck Diagnoses backing store problems. page 42
iwfsfix Fixes problems found by iwfsck. page 44
iwfsshrink Finds and removes duplicate data in the page 45
backing store.
iwgetelog Returns location of TeamSite events log page 47
(default: /var/adm/iwevents.log).
iwgeteventcomments Displays comments associated with a page 136
TeamSite workflow event.
iwgeteventfiles Displays a list of files associated with a page 137
TeamSite workflow event.
iwgetfilejobs Returns a list of associated workflow job page 48
and task IDs for a file.
iwgethome Returns location of TeamSite program files page 49
(default: /usr/iw-home).
iwgetlocation Returns the locations of various TeamSite page 50
log and configuration files.
iwgetlog Returns location of TeamSite server log page 52
(default:
/var/adm/iwserver.log).
iwgetmount Returns location of TeamSite mount point page 53
(/iwmnt).
iwgetstore Returns location of TeamSite backing store page 54
(default: /local/iw-store).
iwgettaskbyname Writes the task ID to stdout for a task page 138
specified by name.
iwgettrace Returns location of TeamSite trace logs page 55
(default: /var/adm/iwtrace.log).
iwgetwfobj Prints the state of any part of the server page 139
workflow subsystem in XML.

TeamSite Command-Line Tools 251


Appendix A: Master List

Table 26 CLT alphabetized master list (Continued)


iwgroup Administers TeamSite groups (list groups, page 56
add and delete groups or members within a
group, modify group names, and other
operations).
iwidmap Change the mapping between the UID and page 63
the token. It can also be used to refresh the
mapping when the same names are used, but
the UID has changed.
iwinvokejob Starts a job whose instance has already been page 140
created on the TeamSite server.
iwjobc Creates a job instance (based on a job page 141
specification file) on the TeamSite server.
iwjobvariable Manipulates workflow variables. page 142
iwlasted Returns the name of the last published page 143
edition on a branch.
iwldapmigrate Creates a new version of tsusers.xml page 144
containing LDAP OS user information
previously stored in
tsldapuserscache.xml. Configures the
LDAP server in user_databases.xml.
iwldapsearch A search program to query an LDAP page 146
directory.
iwldapsync Synchronizes information about TeamSite page 150
users from one or more LDAP servers.
Modifies entries in tsusers.xml based on
configuration settings in
user_databases.xml and information
obtained from LDAP servers.
iwlist Returns a list of all areas contained by a page 150
parent areas. For example, iwlist returns
all editions, workareas, and branches
contained on a parent branch.
iwlistlocks Lists the locks and assignments in a page 153
workarea or branch.
iwlistmod Lists all modified files and directories in a page 154
specified area.
iwlock Locks any file or directory in a specified page 155
area.
iwlockinfo Provides detailed information on any lock. page 156
iwlsat Lists registered iwat programs. page 247
iwmerge Merges files from one area into another. page 157
iwmigrate Splits or moves Content Stores. page 64
iwmkbr Creates a new TeamSite branch. page 158
iwmkwa Creates a new TeamSite workarea. page 159
iwmvtaskfile Renames a file that is attached to a TeamSite page 160
task.

Interwoven, Inc. 252


Appendix A: Master List

Table 26 CLT alphabetized master list (Continued)


iwndxaddbr Adds a branch to be indexed. page 161
iwndxfreezebr Freezes or unfreezes the indexing of a page 162
branch.
iwndxlistbr Displays a list of indexed branches. page 163
iwndxmgrfreeze Freezes or unfreezes the index manager. page 164
iwndxmgrstatus Displays the current status of the index page 165
manager.
iwndxmgrstop Shuts down the index manager. page 166
iwndxpurgebr Deletes the index collections associated with page 167
a branch.
iwndxrefreshbr Reindexes a branch by putting it in the bulk page 168
or incremental queue.
iwndxrmbr Removes indexing information for an page 169
indexed branch.
iwndxstatus Displays the current index status for a list of page 170
specified branches from the index manager.
iwndxwamodificationsbr Enables or disables the indexing of page 172
workareas of the specified branch (which is
being indexed by the index server).
iwnexted Returns the name that would be page 173
autogenerated for the next edition on a
branch.
iwprefconv Copies existing homepage information from page 66
the iwprofiles directory to the entity
database.
iwprop Manipulates TeamSite user properties. page 174
iwproxy Invokes a proxy server. page 67
iwprv Allows users to identify whether any file or page 176
directory in any workarea is marked private
and automatically mark any file as either
private or public.
iwpublish Publishes the staging area. page 177
iwqueryjobs Prints a list of overall job information based page 178
on a query from stdin.
iwquerytasks Prints a list of job task information based on page 179
a query from stdin.
iwrcsdiff Shows the differences between two versions page 181
of a file.
iwrecentusers Displays a list of everyone who has used page 68
TeamSite since the last time the TeamSite
server was started, and a timestamp of each
user’s most recent TeamSite operation.
iwrename Renames a file, directory, workarea, edition, page 183
or branch.

TeamSite Command-Line Tools 253


Appendix A: Master List

Table 26 CLT alphabetized master list (Continued)


iwreset Rereads TeamSite configuration files. page 69
iwretryjobop Retries submission or task update after page 184
resolution of conflicts that originally
prevented those operations.
iwrevert Revert to a previous version of a file. page 185
iwrlog Shows a revision log for a TeamSite file. page 186
iwrmat Removes registered iwat programs. page 248
iwrmbr Deletes a TeamSite branch and all contained page 188
areas (workareas, staging areas, and
editions).
iwrmed Deletes an edition. page 189
iwrmjob Unconditionally removes an entire job page 190
instance from the TeamSite server.
iwrmtaskfile Removes a file from a job task. page 191
iwrmtaskgroup Removes groups from group tasks. page 192
iwrmtaskuser Removes users from group tasks. page 193
iwrmuser Removes a user from TeamSite. page 70
iwrmwa Deletes a TeamSite workarea. page 194
iwroleadm Lets you view, create, delete, and otherwise page 71
administer roles.
iwsetjobdescription Changes the description of a job. page 195
iwsetjobowner Changes the owner of a job. page 196
iwsettaskattrib Sets a new value for task attributes that have page 197
true or false values.
iwsettaskcomment Assigns a comment to a TeamSite task page 198
iwsettaskdescription Assigns a description to a TeamSite task. page 199
iwsettaskfilecomment Assigns a comment to a file associated with page 200
a TeamSite task.
iwsettaskownerandarea Assigns an owner and workarea to a page 201
TeamSite task.
iwsettasktimeout Changes the time-out value on an inactive page 202
task that already has a time-out.
iwsi Collects system state data. page 71
iwsrchattrib Displays a list of indexed extended page 203
attributes or templating attributes.
iwsrchgethome Displays the location of the search home page 206
directory.
iwsrchgetpage Displays the results page of a search query. page 207
iwsrchmgrping Pings the search manager. page 209
iwsrchmgrstop Shuts down the search manager. page 210

Interwoven, Inc. 254


Appendix A: Master List

Table 26 CLT alphabetized master list (Continued)


iwsrchndxstatus Displays the current index status for a list of page 211
specified branches from the search manager.
iwsrchndxstatuschg Reports index status changes. page 213
iwsrchquery Queries the search manager. page 214
iwstat Returns current system activity. page 77
iwstoreadm Activates or deactivates a backing store. page 80
iwsubmit Submits any TeamSite workarea, file, or page 217
directory to the staging area.
iwtaketask Assigns a shared task to a single user. page 218
iwtaskselect Marks a user’s job task finished and selects page 219
a successor task.
iwtaskvariable Creates, deletes, sets, and retrieves values of page 220
variables on a TeamSite task.
iwtestcfg Returns the operation that will be performed page 81
upon a file at submission time.
iwtock Manipulates and displays data about the page 82
TeamSite watchdog daemon.
iwuidname Returns the user login name corresponding page 83
to a specified UID.
iwundochoice Reverses a user-chosen transition from a page 221
user task or group task.
iwunlock Unlocks any file or directory. page 222
iwuntaketask Removes the ownership of an active group page 223
task.
iwupdate Updates a TeamSite workarea with the page 224
version of a file or directory in the staging
area.
iwuser Enables you to manipulate TeamSite user page 84
information.
iwuseradm Lets you add and remove TeamSite users, page 87
change user attributes, view and set user
roles.
iwutildreset Resets iwutild configuration settings. page 91
iwutildstat Displays active iwutild server operation page 92
statistics.
iwversion Returns current TeamSite release page 93
information.
iwvpath Prints all or parts of the version path of a page 225
specified object.

TeamSite Command-Line Tools 255


Appendix A: Master List

Interwoven, Inc. 256


Appendix B

Sample Command Trigger


Scripts

This appendix contains the following sample command trigger Perl scripts:
„ email_to.ipl – sends email to a list of users when a triggering event occurs.
„ replicate_tobranch.ipl – replicates submitted files and directories from a
workarea to the staging area of a specified branch.

Email Notification Script


The following Perl script, email_to.ipl, sends email to a specified list of users when a
triggering event occurs. Usage and syntax are explained in comment lines.

#!/usr/local/bin/perl
# email_to.ipl
#
# Usage:
# iwatasgn email_to.ipl tolist
# iwatlock email_to.ipl tolist
# iwatmkbr email_to.ipl tolist
# iwatmkwa email_to.ipl tolist
# iwatpub email_to.ipl tolist
# iwatrmbr email_to.ipl tolist
# iwatrmed email_to.ipl tolist
# iwatrmwa email_to.ipl tolist
# iwatsub email_to.ipl tolist
# iwatunlock email_to.ipl tolist
#
# (Unix)
# Example : iwatpub email_to.pl 'mktg,staff,$IW_EVENTUSER'
# Example : iwatasgn email_to.pl '$IW_ASSIGNEE,$IW_EDITOR'
# Example : iwatsub email_to.pl '$IW_EVENTUSER,mktg'
#
# (NT)
# Example : perl iwatpub perl email_to.pl mktg,staff,$IW_EVENTUSER
# Example : perl iwatasgn perl email_to.pl $IW_ASSIGNEE,$IW_EDITOR

TeamSite Command-Line Tools 257


Appendix B: Sample Command Trigger Scripts

# Example : perl iwatsub perl email_to.pl $IW_EVENTUSER,mktg


#

$| = 1;

use Config;
if ($Config{osname} eq "MSWin32") {
$MAILER = 'blat.exe - -t';
} else {
$MAILER = '/usr/lib/sendmail';
}

# Change $DEFDOMAIN to be default domain suffix for user email


# $DEFDOMAIN = '@YOURDOMAIN.NET';

# $FROMUSER is added to From: line in emails


$FROMUSER = 'teamsite (TeamSite notifier)';

# $SIGNATURE is added to end of messages - signature string


$SIGNATURE = "\n\nTeamSite is brought to you by Interwoven.";

# Preprocess path to include iw-home in case script is called from


# environment without path initialization

$IW_HOME = `iwgethome`; chop $IW_HOME;


if ( $ENV{'PATH'} !~ m|$IW_HOME/bin| ) {
$ENV{'PATH'} .= ":$IW_HOME/bin";
}

# Add $IW_HOME/lib/perl5 to Perl module include path


push @INC, "$IW_HOME/iw-perl/lib";

use File::Basename;
$MYNAME = basename($0, ".pl" );
use Env qw(PATH IWDEBUGERR IWDEBUGMAIL IW_EVENT IW_TIMESTAMP
IW_EVENTUSER IW_EVENTROLE IW_AREA IW_FILEPATH IW_OBJID
IW_ASSIGNEE IW_COMMENTS);

# $IWDEBUGERR true allows system calls to print errors to STDERR


# $IWDEBUGERR=1;

# $IWDEBUGMAIL true redirects output to STDOUT instead of mail program


# $IWDEBUGMAIL=1 unless defined($IWDEBUGMAIL);

# Redirect STDERR and set up signal


# handler to restore STDERR for final error message

$IWDEBUGERR=0 unless defined($IWDEBUGERR);


if (! $IWDEBUGERR) {

Interwoven, Inc. 258


Appendix B: Sample Command Trigger Scripts

open(SAVESTDERR, ">&STDERR") || die "Can't save STDERR, $!\n";


open(STDERR,">/dev/null") || die "Can't open STDERR to /dev/
null\n";

$SIG{__DIE__} = sub {
open(STDERR, ">&SAVESTDERR");
die "$MYNAME: " . $_[0];
};
}

# Mail programs - uses reference to hash with keys being email


# users

sub MailTolist {
my $maillist_p = $_[0];
my $maillist = join ",", map "$_$DEFDOMAIN", keys %$maillist_p;
return $maillist;
}
sub MailTo {
my $maillist = MailTolist($_[0]);
my $oldfh;

return unless $maillist;

unless ($IWDEBUGMAIL) {
open (MAIL, "| $MAILER $maillist")
or die "Couldn't open pipe to $MAILER $maillist\n";
$oldfh = select MAIL;
}
else {
print "Pipe to $MAILER $maillist\n";
}

# Insert mail header


print "From: $FROMUSER\n";
print "To: $maillist\n";
print "Reply-To: $FROMUSER\n";

if ( $IW_EVENT eq "AssignFile" ) { &MailAssign; }


elsif ( $IW_EVENT eq "ApproveFile" ) { &MailApprove; }
elsif ( $IW_EVENT eq "RejectFile" ) { &MailReject ; }
elsif ( $IW_EVENT eq "UnassignFile" ) { &MailUnassign; }
elsif ( $IW_EVENT eq "MarkDoneFile" ) { &MailMarkDone; } ;

print "$IW_COMMENTS\n";

&DumpAll;

print "$SIGNATURE\n";

TeamSite Command-Line Tools 259


Appendix B: Sample Command Trigger Scripts

unless ($IWDEBUGMAIL) {
close (MAIL);
select $oldfh;
}
}

sub MailAssign {
print "Subject: File assigned to $IW_ASSIGNEE: $IW_FILEPATH\n\n";
print "Timestamp: $IW_TIMESTAMP\n";
print "Branch: $IW_BRANCH\n";
print "Workarea: $IW_AREA\n";
print "Workarea owner: $IW_EDITOR\n";
print "Assigned by user: $IW_EVENTUSER\n";
print "File path: $IW_FILEPATH\n";
print "\nAssignment comments:\n" . "-" x 60 . "\n";
}
sub MailApprove {
print "Subject: File approved by $IW_EVENTUSER: $IW_FILEPATH\n\n";
print "Timestamp: $IW_TIMESTAMP\n";
print "Branch: $IW_BRANCH\n";
print "Workarea: $IW_AREA\n";
print "Workarea owner: $IW_EDITOR\n";
print "Approved by: $IW_EVENTUSER\n";
print "File path: $IW_FILEPATH\n";
print "\nApproval comments:\n" . "-" x 60 . "\n";
}
sub MailReject {
print "Subject: File rejected by $IW_EVENTUSER: $IW_FILEPATH\n\n";
print "Timestamp: $IW_TIMESTAMP\n";
print "Branch: $IW_BRANCH\n";
print "Workarea: $IW_AREA\n";
print "Workarea owner: $IW_EDITOR\n";
print "Rejected by: $IW_EVENTUSER\n";
print "File path: $IW_FILEPATH\n";
print "\nRejection comments:\n" . "-" x 60 . "\n";
}
sub MailUnassign {
print "Subject: File unassigned by $IW_EVENTUSER:
$IW_FILEPATH\n\n";
print "Timestamp: $IW_TIMESTAMP\n";
print "Branch: $IW_BRANCH\n";
print "Workarea: $IW_AREA\n";
print "Workarea owner: $IW_EDITOR\n";
print "Unassigned by: $IW_EVENTUSER\n";
print "File path: $IW_FILEPATH\n";
print "\nUnassignment comments:\n" . "-" x 60 . "\n";
}
sub MailMarkDone {
print "Subject: File marked done by $IW_EVENTUSER:
$IW_FILEPATH\n\n";

Interwoven, Inc. 260


Appendix B: Sample Command Trigger Scripts

print "Timestamp: $IW_TIMESTAMP\n";


print "Branch: $IW_BRANCH\n";
print "Workarea: $IW_AREA\n";
print "Workarea owner: $IW_EDITOR\n";
print "Marked done by: $IW_EVENTUSER\n";
print "File path: $IW_FILEPATH\n";
print "\nMark Done comments:\n" . "-" x 60 . "\n";
}

sub DumpAll {
@vars = qw(
IW_TIMESTAMP IW_EVENTUSER IW_EVENTROLE IW_EVENT
IW_VPATH IW_EVENTLINE IW_BRANCH IW_EDITION
IW_STAGINGAREA IW_WORKAREA IW_AREA IW_FILE
IW_FILEPATH IW_OBJID IW_ASSIGNEE IW_EDITOR
IW_COMMENTS IW_SUBMITID);
for ($i=0; $i<=$#vars; $i++) {
$v = $vars[$i];
if (! $ENV{$v}) { next; }
print "$v : $ENV{$v}\n";
}
}

# MAIN code
#

# Grab the mail targets...


#
foreach $mailDst (split(",", $ARGV[0])) {
##print $mailDst;
if ($mailDst =~ /^\$/) {
$mailDst =~ s/^\$//;
$mailDst = $ENV{$mailDst};
##print "changed to $mailDst\n";
}
$emaillist{$mailDst} = 1;
}

MailTo(\%emaillist);

# -w mode can be a bit noisy for testing - eliminate unused var


# warnings
sub fakewarnings {
my $i1 = \$DEFDOMAIN;
my $i2 = \$SAVESTDERR;
my $i3 = \$objid;
}

TeamSite Command-Line Tools 261


Appendix B: Sample Command Trigger Scripts

Replication Script
The following Perl script, replicate_tobranch.pl, replicates files and directories to
the staging area of a specified branch. Replication is triggered whenever the files or
directories are submitted to their original workarea. This script is designed for use with
the iwatsub command trigger and is typically used to integrate content from one or
more subbranches back to a parent branch. Syntax and an example are included in
comment lines. Due to this document’s formatting constraints, some individual lines are
depicted below as two or more lines. These lines are indicated by a large, bold-face
exclamation point (!). A line ending with this character should be joined with the next
line to form a single line of code.

#!/usr/local/bin/perl
#replicate_tobranch.pl
##This program replicates submitted files/dirs from a workarea
##to the staging area of a specified branch. This can be useful
##when integrating content from subbranches back to parent
##branches.
##Example:
##Given Teamsite directory layout:
##main->dev1
## EDITION
## STAGING
## WORKAREA
## ->dev2
## EDITION
## STAGING
## WORKAREA
## user1
## file1
##
##> iwatsub replicate_tobranch.pl dev1
##
##When file1 is submitted to dev2 STAGING, a submit event
##will be generated, and file1 will also get submitted to
##STAGING in dev1.
push @INC, "/usr/local/lib/perl5";

#get argument as the pathname for download directory

if ($#ARGV >=0) {
$submitto_branch="//IWSERVER/default/main/". @ARGV[0];
} else {
$submitto_branch="//IWSERVER/default/main/acmetest/A"; #default
}

#Assume the replicated workarea is called wa1


$replicate_workarea="$submitto_branch/WORKAREA/wa1";

Interwoven, Inc. 262


Appendix B: Sample Command Trigger Scripts

chomp ($iwhome = `/usr/bin/iwgethome`);


$iwhomebin=$iwhome . "/bin";

# environment variables available


$event = $ENV{'IW_EVENT'}; # should always be "Submit"
$timestamp = $ENV{'IW_TIMESTAMP'};
$user = $ENV{'IW_EVENTUSER'};
$role = $ENV{'IW_EVENTROLE'};
$objid = $ENV{'IW_SUBMITID'};
$path = $ENV{'IW_WORKAREA'};

# testing only, get the last event, assume it's submit for now

if ($event eq "") {
$eventlog=`$iwhomebin/iwgetelog`;
chop($eventlog);
$tailevent=`grep Submit $eventlog |tail -1`;

@tailevent=split("\t",$tailevent);

$event=@tailevent[3];
$timestamp = @tailevent[0];
$user = @tailevent[1];
$role = @tailevent[2];
$objid = @tailevent[5];
chop($objid);
$path = @tailevent[4];
}

#
#iwlist makes sure the branch is valid
#

$existbranch=`$iwhomebin/iwlist $submitto_branch 2>&1`;


chop($existbranch);

if ($existbranch =~ /ERROR/) { #branch does not exist


print STDERR ("$submitto_branch is not a valid branch.\n");
exit(0);
}

#
#iwlist makes sure the replicated workarea exists in
#submitto_branch
#
$existreparea=`$iwhomebin/iwlist $replicate_workarea 2>&1`;
chop($existreparea);

if ($existreparea =~ /ERROR/) { #reparea does not exist


print STDERR ("$replicate_workarea need to exist.\n");

TeamSite Command-Line Tools 263


Appendix B: Sample Command Trigger Scripts

exit(0);
}

## get submit comment info and submit info field


print "GETTING SUBMIT COMMENTS\n";

$submit_cmt = `$iwhomebin/iwattrib -c submitevent -o $objid $path!


submit_cmt`;
$submit_info = `$iwhomebin/iwattrib -c submitevent -o $objid $path!
submit_info`;
$submit_cmt =~ s/\s+$//;
$submit_info =~ s/\s+$//;

## print info for debugging


print "
For Debugging...
User : $user ($role)
Area : $path
Time : $timestamp
Submit Info: $submit_info
Submit Cmt : $submit_cmt
ObjId : $objid

";

#
#find parentbranch from the path in the submit event
#

($parentbranch,$pathend) = ($path =~ /(.*)\/WORKAREA\/(.*)/ );

print "$parentbranch\n";

#get the list of files/dirs submitted from iwevents CLT

unless(open(SUBLOG, "$iwhomebin/iwevents -s -n $objid |")) {


print STDERR "Can't open iwevents: $!\n";
return;
}

#can only update to a workarea, so in order to submit to a


#specific branch, first
#copy it to a workarea under that branch, then submit

#get individual submitted file/dir name and description

$submit_objs="";
while (<SUBLOG>) {
@result = split('\t', $_);

Interwoven, Inc. 264


Appendix B: Sample Command Trigger Scripts

$action = $result[1];
$obj_type = $result[2];
($filename) = &URLDecode($result[3]);
($description) = &URLDecode($result[5]);
$description =~ s/(\s)+/ /g; # loose newlines/tabs
if ($description eq "<none>") {
$description = "[no comment specified]";
}
print "DEBUG:filename : $filename\n";
print "DEBUG:obj_type : $obj_type $action\n";
print "DEBUG:Individual Comment: $description\n\n";

##construct full path name for the updated file and


##to-replicate workarea

$updateobj = $parentbranch . "\/STAGING" .$filename;


$replicateobj=$replicate_workarea;

print "DEBUG:iwupdate -r $updateobj


$replicateobj...\n";

# update obj to the to-replicate workarea

@updatertn=`iwupdate -r $updateobj $replicateobj`;


print ("$iwhomebin/iwupdate return: @updatertn\n");

# construct submit strings <obj comment> pairs to be


#used in iwsubmit

$submit_objs = $submit_objs. " " . $replicateobj .


$filename . " '". "$description" . "'";
}

print ("DEBUG: submit_objs = $submit_objs\n");


#Submit the newly copied objs
$submitcmd ="$iwhomebin/iwsubmit -r -c \'$submit_cmt\' !
-i \'$submit_info\' $submit_objs";
print "$submitcmd\n";

$submitrtn=`$submitcmd`;
print "DEBUG: submit rtn=$submitrtn\n";

sub URLDecode
{
#Decode a URL encoded string or array of strings
#+ is converted to space
#%NN is converted from hex
foreach (@_) {
s/%0D%0A/ /g;
tr/+/ /;

TeamSite Command-Line Tools 265


Appendix B: Sample Command Trigger Scripts

s/%(..)/pack("c", hex($1))/ge;
}
@_;
}

Interwoven, Inc. 266


Appendix C

Error Codes

This table lists all the possible error codes that can be returned by a TeamSite
command-line tool. Most of them are standard errors, but there are also many
TeamSite-specific error codes. The list of TeamSite-specific error codes starts on
page 273.

Table 27 CLT error codes


# Error Description
General OS and NFS errors
-1 psx_EOF

0 psx_ENFS_OK (NFS error)


0 psx_SUCCESS

0 psx_YES

1 psx_FAILURE Generic failure.


2 psx_ENFS_NOENT (NFS error) No such file or directory.
2 psx_ENOENT No such file or directory.
3 psx_ESRCH No such process.
4 psx_EINTR Interrupted system call.
5 psx_EIO I/O error.
5 psx_ENFS_IO (NFS error) A hard error occurred when the operation
was in progress.
6 psx_ENFS_NXIO (NFS error) No such device or address.
6 psx_ENXIO No such device or address.
7 psx_E2BIG Argument list too long.
8 psx_ENOEXEC Executable file format error.
9 psx_EBADF Bad file number.
10 psx_ECHILD No children.
11 psx_EAGAIN Resource temporarily unavailable.
12 psx_ENOMEM Not enough core memory.
13 psx_EACCES Permission denied.
13 psx_ENFS_ACCES (NFS error) Permission denied.
14 psx_EFAULT Bad address.
15 psx_ENOTBLK Block device required.

TeamSite Command-Line Tools 267


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
16 psx_EBUSY Mount device busy.
17 psx_EEXIST Item already exists.
17 psx_ENFS_EXIST (NFS error) Item already exists.
18 psx_ENFS_XDEV (NFS error) Attempt to do a cross-device hard link.
18 psx_EXDEV Cross-device link.
19 psx_ENFS_NODEV (NFS error) No such device.
19 psx_ENODEV No such device.
20 psx_ENFS_NOTDIR (NFS error) Directory expected, but wasn’t one.
20 psx_ENOTDIR Directory expected, but wasn’t one.
21 psx_EISDIR Is a directory.
21 psx_ENFS_ISDIR (NFS error) Is a directory.
22 psx_EINVAL Invalid argument.
22 psx_ENFS_INVAL (NFS error) Invalid argument or unsupported
argument for an operation.
23 psx_ENFILE File table overflow.
24 psx_EMFILE Too many open files.
25 psx_ENOTTY Inappropriate I/O control for device.
26 psx_ETXTBSY Text file busy.
27 psx_EFBIG File too large.
27 psx_ENFS_FBIG (NFS error) File too large.
28 psx_ENFS_NOSPC (NFS error) Insufficient space to complete operation.
28 psx_ENOSPC Insufficient space to complete operation.
29 psx_ESPIPE Illegal seek.
30 psx_ENFS_ROFS (NFS error) File system is read-only or archive is
frozen.
30 psx_EROFS File system is read-only or archive is
frozen.
31 psx_EMLINK Too many links.
31 psx_ENFS_MLINK (NFS error) Too many hard links.
32 psx_EPIPE Broken pipe.
33 psx_EDOM Math argument out of domain of
function.
34 psx_ERANGE Math result not representable.
35 psx_ENOMSG No message of desired type.
36 psx_EIDRM Identifier removed.
37 psx_ECHRNG Channel number out of range.
38 psx_EL2NSYNC UNIX boot level 2 not synchronized.

Interwoven, Inc. 268


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
39 psx_EL3HLT UNIX boot level 3 halted.
40 psx_EL3RST UNIX boot level 3 reset.
41 psx_ELNRNG Link number out of range.
42 psx_EUNATCH Protocol driver not attached.
43 psx_ENOCSI No CSI structure available.
44 psx_EL2HLT UNIX boot level 2 halted.
45 psx_EDEADLK Resource deadlock condition.
46 psx_ENOLCK No record locks available.
47 psx_ECANCELED Operation canceled.
48 psx_ENOTSUP Operation not supported.
Filesystem Quotas
49 psx_EDQUOT Disk quota exceeded.
Convergent Error Returns
50 psx_EBADE Invalid exchange.
51 psx_EBADR Invalid request descriptor.
52 psx_EXFULL Exchange full.
53 psx_ENOANO No anode.
54 psx_EBADRQC Invalid request code.
55 psx_EBADSLT Invalid slot.
56 psx_EDEADLOCK File locking deadlock error.
57 psx_EBFONT Bad font file format.
Stream Problems
60 psx_ENOSTR Device not a stream.
61 psx_ENODATA No data (for no delay I/O).
62 psx_ETIME Timer expired.
63 psx_ENOSR Out of streams resources.
64 psx_ENONET Machine is not on the network.
65 psx_ENOPKG Package not installed.
66 psx_EREMOTE The object is remote.
67 psx_ENOLINK The link has been severed.
68 psx_EADV Advertise error.
69 psx_ESRMNT Srmount error.
70 psx_ECOMM Communication error on send.
71 psx_EPROTO Protocol error.
72 psx_EBADRPC RPC struct is bad; error checks failed.
73 psx_EDOTDOT RFS specific error.

TeamSite Command-Line Tools 269


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
74 psx_EMULTIHOP Multihop attempted.
77 psx_EBADMSG Trying to read unreadable message.
78 psx_ENAMETOOLONG Path name is too long.
79 psx_EOVERFLOW Value too large to be stored in data type.
80 psx_ENOTUNIQ Given log. name not unique.
81 psx_EBADFD File descriptor invalid for this operation.
82 psx_EREMCHG Remote address changed.
Shared Library Problems
83 psx_ELIBACC Can’t access a needed shared library.
84 psx_ELIBBAD Accessing a corrupted shared library.
85 psx_ELIBSCN .lib section in a.out corrupted.
86 psx_ELIBMAX Attempting to link in too many libraries.
87 psx_ELIBEXEC Attempting to exec a shared library.
88 psx_EILSEQ Illegal byte sequence.
89 psx_ENOSYS Unsupported file system operation.
90 psx_ELOOP Symbolic link loop.
91 psx_ERESTART Restartable system call.
92 psx_ESTRPIPE Pipe or FIFO doesn’t sleep in stream
head.
93 psx_ENOTEMPTY Directory not empty.
94 psx_EUSERS Too many users (for UFS).

Interwoven, Inc. 270


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
BSD Networking Software
argument errors
95 psx_ENOTSOCK Socket operation on non-socket.
96 psx_EDESTADDRREQ Destination address required.
97 psx_EMSGSIZE Message too long.
98 psx_EPROTOTYPE Protocol wrong type for socket.
99 psx_ENOPROTOOPT Protocol not available.
Linux-specific
117 psx_EUCLEAN Structure needs cleaning.
118 psx_ENOTNAM Not a XENIX named type file.
119 psx_ENAVAIL No XENIX semaphores available.
120 psx_EISNAM Is a named type file.
121 psx_EREMOTEIO Remote I/O error.
BSD Networking Software
120 psx_EPROTONOSUPPORT Protocol not supported.
122 psx_EOPNOTSUPP Operation not supported on socket.
123 psx_EPFNOSUPPORT Protocol family not supported.
124 psx_EAFNOSUPPORT Address family not supported by protocol
family.
125 psx_EADDRINUSE Address already in use.
126 psx_EADDRNOTAVAIL Can’t assign requested address.
Operational Errors
127 psx_ENETDOWN Network is down.
128 psx_ENETUNREACH Network is unreachable.
129 psx_ENETRESET Network dropped connection because of
reset.
130 psx_ECONNABORTED Software caused connection abort.
131 psx_ECONNRESET Connection reset by peer.
132 psx_ENOBUFS No buffers available.
133 psx_EISCONN Socket is already connected.
134 psx_ENOTCONN Socket is not connected.
143 psx_ESHUTDOWN Can’t send after socket shutdown.
144 psx_ETOOMANYREFS Too many references: can’t splice.
145 psx_ETIMEDOUT Connection timed out.
146 psx_ECONNREFUSED Connection refused.
147 psx_EHOSTDOWN Host is down.

TeamSite Command-Line Tools 271


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
148 psx_EHOSTUNREACH No route to host.
149 psx_EALREADY Operation already in progress/done.
150 psx_EINPROGRESS Operation now in progress.
151 psx_ESTALE Stale NFS file handle.
301 psx_EPERM No permission; or not super-user.
301 psx_ENFS_PERM (NFS error) Not owner.
311 psx_EWOULDBLOCK Berkeley sockets error - operation would
block till completion.
FreeBSD-specific
398 psx_EJUSTRETURN (400-2) don’t modify registration, just
return.
473 psx_ERPCMISMATCH RPC version wrong.
474 psx_EPROGUNAVAIL RPC program not available.
475 psx_EPROGMISMATCH Program version wrong.
476 psx_EPROCUNAVAIL Bad procedure for program.
479 psx_EFTYPE Inappropriate file type or format.
480 psx_EAUTH Authentication error.
481 psx_ENEEDAUTH Need authenticator.
Linux-specific
512 psx_ERESTARTSYS Linux system startup error.
513 psx_ERESTARTNOINTR Linux system startup error.
514 psx_ERESTARTNOHAND Restart if no handler.
515 psx_ENOIOCTLCMD No I/O control command.
SunOS4-specific
567 psx_EPROCLIM Too many processes.
581 psx_ERREMOTE Object is remote.
OSF/AXP-specific
688 psx_ECLONEME Tells open to clone the device.
689 psx_EDIRTY Mounting a dirty (unchecked) file
system.
690 psx_EDUPPKG Duplicate package name on install.
691 psx_EVERSION Version number mismatch.
693 psx_ENOSYM Unresolved symbol name.
695 psx_EFAIL Cannot start operation.
697 psx_EINPROG Operation (now) in progress.
698 psx_EMTIMERS Too many timers.
700 psx_EAIO Internal AIO operation complete.

Interwoven, Inc. 272


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
723 psx_ESOFT Indicates a correctable error.
724 psx_EMEDIA Returned by a disk driver to indicate a
hard ECC error or similar disk media
failure.
725 psx_ERELOCATED “Success” code indicating that a defect
relocation request was performed
successfully.
Misc. generic error numbers
901 psx_EEXITING Exiting process/thread.
905 psx_EIMPLEMENT Function not yet implemented.
910 psx_EBUFTOOSMALL Buffer is too small for output.
911 psx_ESTRTOOLONG String argument is too long.
920 psx_ENOTFOUND Object being looked up was not found.
925 psx_ENOUSER No such user.
930 psx_ERPCFAILURE RPC connection failure.
980 psx_ENOAUTHENDONE No authentication was done.
981 psx_ENOAUTHORDONE No authorization was done.
999 psx_NO “No” is the response.
Interwoven-specific error codes
2000 psx_EITERENDED Iteration ended.
2001 psx_EITERNOENT No iteration entry.
2003 psx_ENOBASEED Invalid base edition for operation.
2004 psx_ENOSE No server found.
2005 psx_ENOAR No archive found.
2006 psx_ENOBR No branch found.
2007 psx_ENOWA No workarea found.
2008 psx_ENOED No edition found.
2009 psx_ENOFSE No file or directory found.
2010 psx_ENOPREVFSE No previous file or directory found.
2011 psx_ENOWADIR Workarea directory not found.
2012 psx_ENOEDDIR Edition directory not found.
2013 psx_ENOSA No staging area found.
2014 psx_ENOOP No operation found.
2015 psx_ENOTAG No tag found.
2016 psx_ECONFLICTS Conflicts prevent operation.
2017 psx_ECHECKEDOUT Checked out files prevent submitting.
2018 psx_EWABRBAD Workarea does not match branch.

TeamSite Command-Line Tools 273


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
2019 psx_EONLYED Cannot destroy last remaining edition on
branch.
2100 psx_EBADNAME Illegal name given.
2102 psx_EBADVPATH Bad version path.
2150 psx_EPRIVATE Illegal operation on private file or
directory.
2200 psx_ENOROLE No such role.
2300 psx_EILOP Illegal operator.
2301 psx_ENOATTRIB No such attribute.
2400 psx_ERESERVED Object is being reserved by someone else.
2401 psx_ESAMEFSE File or directory is the same as the other
version.
2402 psx_ENEWERFSE File or directory is newer than the other
version.
2403 psx_ENOUPDATE No update performed.
2404 psx_ENOSUBMIT No submit performed.
2405 psx_ENOCMPRS Compressing workarea, staging area, or
latest edition is not allowed.
2408 psx_EMULTIBR More than one branch found.
2409 psx_EMULTIWA More than one workarea found.
2410 psx_ENOGROUP No such group.
2411 psx_EDELETED File had been deleted.
2412 psx_EASSIGNED Assigned files prevent submitting.
2413 psx_ENOTAUTHOR Must be Author.
2414 psx_EOLDERFSE File is older than the other version.
2415 psx_ENOTWAMBR Not owner or member of workarea.
2416 psx_EABORTED Operation aborted.
2417 psx_ENEWERDELETION File or directory is a deletion of the other
file or directory.
2418 psx_ENOROLEAUTH Role is not authorized for this user.
2419 psx_EWRONGUSERPWD Invalid username/password combination.
2420 psx_ENODOMAIN Domain does not exist.
2421 psx_ENOSADIR Staging area directory not found.
2422 psx_ENOTSUSER No such TeamSite user.
ODBC errors
21098 psx_ECONN_INVALID_HANDLE ODBC code: invalid handle.
21099 psx_ECONN_ERROR ODBC code: generic error.

Interwoven, Inc. 274


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
21101 psx_ECONN_SUCCESS_WITH_INFO ODBC code: success; more information
is coming.
21199 psx_ECONN_NEED_DATA ODBC code: need more data.
21200 psx_ECONN_NO_DATA_FOUND ODBC code: no data found.
Interwoven Object Transfer Protocol
21501 psx_ECOP_ILLXPORT Illegal transport.
21502 psx_ECOP_XPORTNOTAVAIL Transport not available.
21503 psx_ECOP_NOSERVER Server not found.
21504 psx_ECOP_BUFTOOSMALL Buffer too small.
21505 psx_ECOP_NOTENOUGHDATA Not enough bytes.
21506 psx_ECOP_BADBYTECOUNT Incorrect byte count.
21507 psx_ECOP_ILLDATA Illegal data.
21508 psx_ECOP_METHODNOTAVAIL Specified method not available.
21510 psx_ECOP_VERNOTSUP COP version not supported.
21512 psx_ECOP_BADMSGINDEX Incorrect message index.
22001 psx_ESC_FAILURE General Special Channel failure.
22004 psx_ESC_BADKEY Bad Special Channel key.
22006 psx_ESC_NOCHANNEL No Special Channel.
22008 psx_ESC_NODIR No Special Channel directory.
22010 psx_ESC_CANTCREATE Cannot create Special Channel.
NFS errors
100063 psx_ENFS_NAMETOOLONG File name too long.
100066 psx_ENFS_NOTEMPTY Directory not empty.
100069 psx_ENFS_DQUOT Disk quota exceeded.
100070 psx_ENFS_STALE Invalid file handle.
100071 psx_ENFS_REMOTE The file handle given in the arguments
referred to a file on a non-local file
system on the server.
100099 psx_ENFS_WFLUSH The server’s write cache used in the
“WRITECACHE” call got flushed to
disk.
110001 psx_ENFS_BADHANDLE Illegal NFS file handle. The file handle
failed internal consistency checks.
110002 psx_ENFS_NOT_SYNC Update synchronization mismatch was
detected during a SETATTR operation.
110003 psx_ENFS_BAD_COOKIE READDIR or READDIRPLUS cookie is
stale.
110004 psx_ENFS_NOTSUPP Operation is not supported.
110005 psx_ENFS_TOOSMALL Buffer or request is too small.

TeamSite Command-Line Tools 275


Appendix C: Error Codes

Table 27 CLT error codes (Continued)


# Error Description
110006 psx_ENFS_SERVERFAULT An error occurred on the server which
does not map to any of the legal NFS
version 3 protocol error values
110007 psx_ENFS_BADTYPE An attempt was made to create an object
of a type not supported by the server.
110008 psx_ENFS_JUKEBOX The server initiated the request, but was
not able to complete it in a timely
fashion.

Interwoven, Inc. 276


Appendix D

Search Query Schemas

This appendix contains the following search query XML schemas, which are used with
the iwsrchquery CLT:
„ BaseQueryLanguage.xsd – the basic search query schema.
„ FullTextQueryElements.xsd – extends BaseQueryLanguage.xsd to support
full-test searches for documents and attributes.
„ TeamSiteSearch.xsd – extends BaseQueryLanguage.xsd to support searches for
FormsPublisher templating attributes.

BaseQueryLanguage.xsd
<?xml version="1.0" encoding="UTF-8" ?>

<!-- The basic search language, which may be extended by various


Interwoven products -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">

<!-- Basic and abstract types -->

<xs:complexType name="constraint" abstract="true">


<xs:annotation>
<xs:documentation>The base type of all constraints
</xs:documentation>
</xs:annotation>
</xs:complexType>

<xs:group name="attributeSpecifier">
<xs:annotation>
<xs:documentation>
Used to refer to attributes in attributeConstraints, selectors
and ordering clauses
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<!-- dataType is normally string/int/long/date and is optional

TeamSite Command-Line Tools 277


Appendix D: Search Query Schemas

(usually wont be used) -->


<xs:element name="dataType" type="xs:string" minOccurs="0"/>
<!-- modifier is normally not used except in select and ordering
clauses -->
<xs:element name="modifier" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>

<xs:complexType name="attributeConstraint" abstract="true">


<xs:annotation>
<xs:documentation>The superclass of all field constraints.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="constraint">
<xs:sequence>
<xs:group ref="attributeSpecifier"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="attribute">
<xs:annotation>
<xs:documentation>
Used to refer to attributes in select and ordering clauses
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:group ref="attributeSpecifier"/>
</xs:sequence>
</xs:complexType>

<xs:element name="attribute" type="attribute"/>

<!-- Logical types, used to group atomic constraints into larger


constructs -->

<xs:complexType name="and">
<xs:annotation>
<xs:documentation>
A constraint formed by logically 'AND'ing a set of constraints.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="constraint">
<xs:sequence>
<xs:element ref="constraint" maxOccurs="unbounded" />
</xs:sequence>

Interwoven, Inc. 278


Appendix D: Search Query Schemas

</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="or">
<xs:annotation>
<xs:documentation>
A constraint formed by logically 'OR'ing a set of constraints
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="constraint">
<xs:sequence>
<xs:element ref="constraint" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="accrue">
<xs:annotation>
<xs:documentation>
A constraint whose relevance is determined by the number
of sub-constraints that match.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="constraint">
<xs:sequence>
<xs:element ref="constraint" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="not">
<xs:annotation>
<xs:documentation>Negates a constraint</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="constraint">
<xs:sequence>
<xs:element ref="constraint" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<!-- The operator is used as a means to compare a typed information -->


<xs:simpleType name="operator">

TeamSite Command-Line Tools 279


Appendix D: Search Query Schemas

<xs:annotation>
<xs:documentation>
An operator for logical attribute comparisons
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="LT" />
<xs:enumeration value="GT" />
<xs:enumeration value="EQ" />
<xs:enumeration value="NEQ" />
<xs:enumeration value="GE" />
<xs:enumeration value="LE" />
</xs:restriction>
</xs:simpleType>

<xs:complexType name="attributeComparison">
<xs:annotation>
<xs:documentation>
Used to logically compare a attribute to a constant
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="attributeConstraint">
<xs:sequence>
<xs:element name="operator" type="operator" />
<xs:element name="value" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<!--
This is how you construct a search predicate. A search predicate is
a constraint. This constraint may be any subtype of the abstract
"constraint" type, including the compound (and, or) constraints that
allow logical grouping of atomic constraints. Some search systems
will only support documents that are of type predicate. Others will
support full-fledged queries (defined in the element "query"
-->
<xs:element name="predicate">
<xs:annotation>
<xs:documentation>The root of a query predicate</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element ref="constraint" />
</xs:all>
</xs:complexType>
</xs:element>

Interwoven, Inc. 280


Appendix D: Search Query Schemas

<xs:complexType name="selector">
<xs:annotation>
<xs:documentation>
An abstract element that defines the selector portion of a query
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="attribute" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ordering">
<xs:annotation>
<xs:documentation>
An abstract element that defines how to order results
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="attribute" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:element name="selector" type="selector"/>


<xs:element name="ordering" type="ordering"/>

<!--
This is how you construct a full-fledged query. Note that some
query APIs will not support the full query, but instead support
only subsets of it.
-->
<xs:element name="query">
<xs:annotation>
<xs:documentation>A full query.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="selector" minOccurs="0"/>
<xs:element ref="predicate" minOccurs="0"/>
<xs:element ref="ordering" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<!--
Substitution groups define the ability to use the various constraints
in place of the abstract bases "constraint" and
"attributeConstraint".
-->

<xs:element name="constraint" abstract="true">

TeamSite Command-Line Tools 281


Appendix D: Search Query Schemas

<xs:annotation>
<xs:documentation>
The abstract substitution group for any constraint
</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="attributeConstraint" type="attributeConstraint"


substitutionGroup="constraint">
<xs:annotation>
<xs:documentation>
The abstract substitution group for attribute constraints
</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="and" type="and" substitutionGroup="constraint" />


<xs:element name="or" type="or" substitutionGroup="constraint" />
<xs:element name="not" type="not" substitutionGroup="constraint" />
<xs:element name="accrue" type="accrue"
substitutionGroup="constraint"/>

<xs:element name="attributeComparison" type="attributeComparison"


substitutionGroup="attributeConstraint" />

</xs:schema>

FullTextQueryElements.xsd
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Full-Text components of the Interwoven Query Language.

The elements here extend the base query language and add
full-text search ability for documents and attributes.

Author: Navneet Joneja (Interwoven)


-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:include schemaLocation="BaseQueryLanguage.xsd"/>

<xs:complexType name="fulltext" abstract="true">


<xs:annotation>
<xs:documentation>
A full text constraint. Abstract.
</xs:documentation>

Interwoven, Inc. 282


Appendix D: Search Query Schemas

</xs:annotation>
<xs:complexContent>
<xs:extension base="constraint" />
</xs:complexContent>
</xs:complexType>

<xs:complexType name="fulltext-any">
<xs:annotation>
<xs:documentation>
A fulltext constraint that searches for any of the terms
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="fulltext">
<xs:sequence>
<xs:element name="term" type="xs:string" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="fulltext-accrue">
<xs:annotation>
<xs:documentation>
A fulltext constraint that searches for any of the terms
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="fulltext">
<xs:sequence>
<xs:element name="term" type="xs:string" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="fulltext-all">
<xs:annotation>
<xs:documentation>
A fulltext constraint that searches for all of the terms
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="fulltext">
<xs:sequence>
<xs:element name="term" type="xs:string" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

TeamSite Command-Line Tools 283


Appendix D: Search Query Schemas

<xs:complexType name="fulltext-phrase">
<xs:annotation>
<xs:documentation>
A fulltext constraint that searches for a phrase
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="fulltext">
<xs:sequence>
<xs:element name="term" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="fulltext-sentence">
<xs:annotation>
<xs:documentation>
A fulltext constraint that searches for its terms in the
same sentence
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="fulltext">
<xs:sequence>
<xs:element name="term" type="xs:string" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="fulltext-near">
<xs:annotation>
<xs:documentation>
A fulltext constraint that searches for its terms based
on their proximity
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="fulltext">
<xs:sequence>
<xs:element name="ordered" type="xs:boolean" />
<xs:element name="proximity" type="xs:int" />
<xs:element name="term" type="xs:string" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

Interwoven, Inc. 284


Appendix D: Search Query Schemas

<xs:complexType name="fulltext-stem">
<xs:annotation>
<xs:documentation>
A fulltext constraint that searches for a word and its stems
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="fulltext">
<xs:sequence>
<xs:element name="term" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="fulltext-wildcard">
<xs:annotation>
<xs:documentation>
A fulltext constraint based on a wildcard expression
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element name="term" type="xs:string" />
</xs:all>
</xs:complexType>

<xs:complexType name="fulltext-attribute">
<xs:annotation>
<xs:documentation>
A fulltext constraint that is applied to a attribute.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="attributeConstraint">
<xs:sequence>
<xs:element ref="fulltext" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:element name="fulltext" abstract="true"


substitutionGroup="constraint">
<xs:annotation>
<xs:documentation>
The abstract substitution group for a fulltext constraint
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="fulltext-accrue" type="fulltext-accrue"

TeamSite Command-Line Tools 285


Appendix D: Search Query Schemas

substitutionGroup="fulltext" />
<xs:element name="fulltext-any" type="fulltext-any"
substitutionGroup="fulltext" />
<xs:element name="fulltext-all" type="fulltext-all"
substitutionGroup="fulltext" />
<xs:element name="fulltext-phrase" type="fulltext-phrase"
substitutionGroup="fulltext" />
<xs:element name="fulltext-sentence" type="fulltext-sentence"
substitutionGroup="fulltext" />
<xs:element name="fulltext-near" type="fulltext-near"
substitutionGroup="fulltext" />
<xs:element name="fulltext-stem" type="fulltext-stem"
substitutionGroup="fulltext" />
<xs:element name="fulltext-wildcard" type="fulltext-wildcard"
substitutionGroup="fulltext" />
<xs:element name="fulltext-attribute" type="fulltext-attribute"
substitutionGroup="attributeConstraint"/>
</xs:schema>

TeamSiteSearch.xsd
<?xml version="1.0" encoding="UTF-8" ?>

<!-- The query language for TeamSite search -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="FullTextQueryElements.xsd"/>

<!-- Extension that allows querying based on a particular language -->


<xs:element name="queryLocale" type="xs:string" maxOccurs="1">
<xs:annotation>
<xs:documentation>A constraint that restricts the search to a
particular locale</xs:documentation>
</xs:annotation>
</xs:element>

<!-- Extension that allows querying based on templating attributes -->


<xs:complexType name="templatingAttribute">
<xs:annotation>
<xs:documentation>
A constraint that searches for a particular templating attribute
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="templateType" type="xs:string" />
<xs:element ref="attributeConstraint" />
</xs:sequence>
</xs:complexType>

Interwoven, Inc. 286


Appendix D: Search Query Schemas

<!--
Extension that allows restriction of scope to files that have a
given file extension.
-->
<xs:complexType name="scope-fileExt">
<xs:annotation>
<xs:documentation>
A constraint that restricts the search to the specified
file extensions
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="extension" type="xs:string" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>

<!--
Extension that allws restriction of the scope to files that live
under a given directory (and its subdirectories)
-->
<xs:complexType name="scope-location">
<xs:annotation>
<xs:documentation>
A constraint that restrics the search to a location
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="constraint">
<xs:sequence maxOccurs="unbounded">
<xs:element name="location" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<!--
Wildcard matching on area-relative-path
-->
<xs:complexType name="areaRelativePath">
<xs:annotation>
<xs:documentation>
A constraint that restrics the search to a location
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="constraint">
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="wildcard" type="xs:string" />
</xs:sequence>

TeamSite Command-Line Tools 287


Appendix D: Search Query Schemas

</xs:extension>
</xs:complexContent>
</xs:complexType>

<!-- Substitution groups for query elements added in this file -->
<xs:element name="templatingAttribute" type="templatingAttribute"
substitutionGroup="constraint" />
<xs:element name="scope-fileExt" type="scope-fileExt"
substitutionGroup="constraint" />
<xs:element name="scope-location" type="scope-location"
substitutionGroup="constraint" />
<xs:element name="areaRelativePath" type="areaRelativePath"
substitutionGroup="constraint" />
</xs:schema>

Interwoven, Inc. 288


Index
A iwatrmbr 240
activating Content Store 80 iwatrmwa 242
ancestor iwatserver 243
print common 34 iwatsub 244
areas iwatunlock 245
comparison 118 iwatupdate 246
list of 151 iwlsat 247
modified files in 154 replication script 262
attributes sample scripts 257, 277
extended 131 starting 228
list 203 testing 233
of servers 107 configuration files
authenticating users 113 interfacing with 36
autoprivate.cfg 69 location 50
rereading 69
conflicts
B resolving 184
branch 162 Content Store 80
changing group ownership 35 activating 80
creating 157, 158, 237 conversion 39
deleting 240 diagnose 42
freeze indexing 162 fixing problems 44
index 161, 163 iwconvertserver 39
indexing 161 iwfsck 42
list indexed 163 iwfsfix 44
locks 153 iwfsshrink 45
removing 188 iwidmap 63
renaming 183 iwmigrate 64
resume indexing 162 iwstoreadm 80
status 213 location 54
branch operation 97 move 64
iwmkbr 157, 158 removing duplicate file contents 45
iwrmbr 188 split 64
BSD networking software error codes 271 controlling 80
convergent error returns 269
C copying files 120
CGI task 115
command trigger 241, 248 D
iwatcreate 235 deactivating Content Store 80
iwat-env 233 decoding %xx lines 121
iwatlock 236 deleting editions 189
iwatmkbr 237 deleting workarea 194
iwatmkwa 238 deployment 96
iwatpub 239 iwdelcp 122

TeamSite Command-Line Tools 289


Index

diagnose Content Store 42 events log


difference list 125 contents 47
differences extended attributes 131
file versions 181 external task 115
directories
synchronizing 125 F
directory
creation 235 file
modified 154 adding to task 102
directory paths 17 copy 120
delete from task 124
displaying 137
E information 133
edition locking 155, 222
deleting 189, 241 modified 154
name of last 143 removing duplicate contents 45
name of next 173 removing from task 191
propagate differences 122 renaming 183
publishing 239 reverting 185
renaming 183 submitting 217, 244
edition operation 97 unlocking 245
iwlasted 143 update 224
iwnexted 173 updating 246
iwpublish 177 version differences 181
iwrmed 189 versions 116
email notification script 257 file difference list 126
encoding HTML %xx lines 127 file system quota error codes 269
environment data filtering 81
collecting 75 finishing task 219
environment variables 233 free BSD specific error codes 272
error codes 267 freeze 40, 77, 162, 164
argument errors 271 freeze index manager 164
BSD networking software 271
convergent error returns 269
file system quotas 269 G
free BSD 272 general development 95
general OS and NFS 267 iwattrib 105
generic 273 iwauthen 113
Interwoven 273 iwckrole 117
Interwoven Object Transfer Protocol 275 iwcp 120
Linux-specific 271, 272 iwdecode 121
NFS 275 iwencode 127
ODBC 274 iwextattr 131
operational 271 iwfilestate 133
OSF/AXP 272 iwldapmigrate 144
shared library 270 iwldapsearch 146
stream problems 269 iwldapsync 150
SunOS4 272 iwlist 151
event iwprop 174
occurring 243 iwrename 183
triggering 244 iwvpath 225

Interwoven, Inc. 290


Index

general OS and NFS errors 267 iwcmp 118


generic error numbers 273 iwconfig 36
Get Latest 224 iwconfigtsreport 37
group ownership iwconvertserver 39
changing 35 iwcp 120
groups iwdecode 121
TeamSite 56 iwdelcp 122
iwdeltaskfile 124
H iwdiffapply 125
iwdiffdir 126
history of workarea 128
HTML %xx lines iwencode 127
decoding 121 iwevents 128
encoding 127 iwextattr 131
iwfilestate 133
iwfreeze 40
I iwfsck 42
incremental file changes 126 iwfsfix 44
index 162, 163, 164, 165, 166, 211, 213 iwfsshrink 45
index manager 161, 164 iwgeteventcomments 136
status 165 iwgeteventfiles 137
stop 166 iwgethome 49
indexing iwgetlocation 50
branch 162 iwgetlog 47, 52
Interwoven error codes 273 iwgetmount 53
Interwoven Object Transfer Protocol error codes iwgetstore 54
275 iwgettaskbyname 138
iw.cfg 36, 69 iwgettrace 55
iwabort 24 iwgetwfobj 139
iwaccess 25 iwgroup 56
iwaccessmigrate 30 iwidmap 63
iwaddtaskfile 102 iwinvokejob 140
iwaddtaskgroup 103 iwjobc 141
iwaddtaskuser 104 iwjobvariable 142
iwancestor 34 iwlasted 143
iwat 232 iwldapmigrate 144
iwatcreate 235 iwldapsearch 146, 150
iwat-env 233 iwldapsync 150
iwatlock 236 iwlist 151
iwatmkbr 237 iwlistlocks 153
iwatmkwa 238 iwlistmod 154
iwatpub 239 iwlock 155
iwatrmbr 240 iwlockinfo 156
iwatrmed 241 iwlsat 247
iwatrmwa 242 iwmigrate 64
iwatserver 243 iwmkbr 158
iwatsub 244 iwmkwa 159
iwattrib 105 iwmvtaskfile 160
iwatunlock 245 iwndxaddbr 161
iwatupdate 246 iwndxfreezebr 162
iwauthen 113 iwndxlistbr 163
iwcallback 115 iwndxmgrfreeze 164
iwcat 116 iwndxmgrstatus 165
iwchgrp 35 iwndxmgrstop 166
iwckrole 117 iwnexted 173

TeamSite Command-Line Tools 291


Index

iwprefconv 66 iwuseradm 87
iwprop 174 iwutildreset 91
iwproxy 67 iwutildstat 92
iwprv 176 iwversion 93
iwpublish 177 iwvpath 225
iwqueryjobs 178
iwquerytasks 179 J
iwrcsdiff 181
iwrecentusers 68 job
iwrename 183 change description 195
iwreset 69 change owner 196
iwretryjobop 184 instantiating 141
iwrevert 185 querying 178
iwrlog 186 removing from server 190
iwrmat 248 running 140
iwrmbr 188
iwrmed 189 L
iwrmjob 190 LDAP configuration 144
iwrmtaskfile 191 LDAP query 146
iwrmtaskgroup 192 LDAP users 150
iwrmtaskuser 193 Linux-specific error codes 271, 272
iwrmwa 194 location 53
iwroleadm 71 locking 156
iwsetjobdescription 195 locking files 155
iwsetjobowner 196 locks 153
iwsettaskattrib 197 directory 236
iwsettaskcomment 198 log
iwsettaskdescription 199 file locations 50
iwsettaskfilecomment 200 revision 186
iwsettaskownerandarea 201 server 52
iwsettasktimeout 202 trace 55
iwsi 75
iwsrchattrib 203
iwsrchgethome 206
M
iwsrchgetpage 207 mapping
iwsrchmgrping 209 changing 63
iwsrchmgrstop 210 metadata
iwsrchndxstatus 211 obtaining 105
iwsrchndxstatuschg 213 modifications
iwsrchquery 214 list of 118
iwstat 77 mount point 53
iwstoreadm 80
iwsubmit 217 N
iwtaketask 218 NSF error codes 275
iwtaskselect 219
iwtaskvariable 220
iwtestcfg 81 O
iwtock 82 object IDs 18
iwuidname 83 objids 18
iwundochoice 221 ODBC error codes 274
iwunlock 222 operational error codes 271
iwuntasktask 223 operations
iwupdate 224 deleting from server 24
iwuser 84 OSF/AXP error codes 272

Interwoven, Inc. 292


Index

P iwndxmgrstop 166
paths iwsrchattrib 203
directory 17 iwsrchgethome 206
version 15, 16 iwsrchgetpage 207
permissions iwsrchmgrping 209
control 25 iwsrchmgrstop 210
migrating 30 iwsrchndxstatus 211
print iwsrchndxstatuschg 213
version path 225 iwsrchquery 214
private workareas 176 search manager
program stop 210
executing 115 server
unregistering 248 log 52
proxy server 67 proxy 67
publishing staging area 177 removing job 190
server operation
terminating 24
Q server workflow
query displaying 139
LDAP 146 server workflow event
query results displaying 136
display 207 service monitor 82
querying jobs 178 shared library error codes 270
querying tasks 179 shared task 218
staging
R publishing 177
submitting to 217
relative vpaths 16 statistics
release information 93 utility daemon 92
removing branch 188 status 211
rename file 160 stopping index manager 166
reporting stream problem error codes 269
configuring 37 submit
reverse task transition 221 resolving conflicts 184
revert file to previous version 185 submit filtering 81
revision log 186 submit to staging 217
roles submit.cfg 69
administer 71 SunOS4 error codes 272
user 117 synchronizing directories 125
system activity 77
S system information 21
script iwgetelog 47
email notification 257 iwgetfilejobs 48
replication 262 iwgethome 49
search 203, 207, 210, 211, 213 iwgetlocation 50
home directory 206 iwgetlog 52
query 214 iwgetmount 53
response time 209 iwgetstore 54
search and index iwgettrace 55
iwndxaddbr 161 iwrecentusers 68
iwndxfreezebr 162 iwstat 77
iwndxlistbr 163 iwuser 84
iwndxmgrfreeze 164 iwversion 93
iwndxmgrstatus 165

TeamSite Command-Line Tools 293


Index

system services 22 U
iwabort 24 unfreeze 40
iwaccess 25 unlock 245
iwaccessmigrate 31 update tasks
iwancestor 34 resolving conflicts 184
iwchgrp 35 user properties 174
iwconfig 36 user_databases.xml 144, 146, 150
iwconfigtsreport 37 users
iwfreeze 40 add to task 104
iwgroup 56 authenticating 113
iwprefconv 66 list of 68
iwproxy 67 login name 83
iwreset 69 manage 87
iwroleadm 71 role 117
iwsi 75 utility daemon
iwtestcfg 81 configuring 91
iwtock 82 statistics 92
iwuidname 83
iwuseradm 87
iwutildreset 91
V
iwutildstat 92 version management 98
iwcat 116
iwcmp 118
T iwdiffapply 125
task iwdiffdir 126
add users 104 iwrcsdiff 181
adding file 102 iwrevert 185
assigning 218 iwrlog 186
attribute 197 version paths 15
comment 198 printing 225
delete file 124 relative 16
description 199 vpaths 15, 116
file comment 200 relative 16
finishing 219
information 138
owner 201, 223 W
querying 179 workarea
remove group 192 changing group ownership 35
remove users 193 creating 159, 238
removing a file from 191 deleting 242
rename file 160 history 128
reverse transition 221 locking 156
variables 220 locks 153
TeamSite private 176
service monitor 75 removing 194
TeamSite program files renaming 183
location 49 submitting 217
timeout 202 update 224
tracelogs workarea operation 97
location 55 iwevents 128
iwlistlocks 153
iwlistmod 154
iwlock 155
iwlockinfo 156

Interwoven, Inc. 294


Index

iwmkwa 159
iwprv 176
iwrmwa 194
iwsubmit 217
iwunlock 222
iwupdate 224
workflow
job and task IDs 48
workflow event 137
workflow variables
manipulating 142
workflow/job 99
iwaddtaskfile 102
iwaddtaskgroup 103
iwaddtaskuser 104
iwcallback 115
iwdeltaskfile 124
iwgeteventcomments 136
iwgeteventfiles 137
iwgettaskbyname 138
iwgetwfobj 139
iwinvokejob 140
iwjobc 141
iwjobvariable 142
iwmvtaskfile 160
iwqueryjobs 178
iwquerytasks 179
iwretryjobop 184
iwrmjob 190
iwrmtaskfile 191
iwrmtaskgroup 192
iwrmtaskuser 193
iwsetjobdescription 195
iwsetjobowner 196
iwsettaskattrib 197
iwsettaskcomment 198
iwsettaskdescription 199
iwsettaskfilecomment 200
iwsettaskownerandarea 201
iwsettasktimeouttask 202
iwtaketask 218
iwtaskselect 219
iwtaskvariable 220
iwundochoice 221
iwuntaketask 223

TeamSite Command-Line Tools 295


Index

Interwoven, Inc. 296

Anda mungkin juga menyukai