1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 >AFS Command Syntax and Online Help</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 TITLE="AFS User Guide"
11 HREF="book1.html"><LINK
13 TITLE="Using the NFS/AFS Translator"
14 HREF="a3632.html"><LINK
17 HREF="g4153.html"></HEAD
28 SUMMARY="Header navigation table"
37 >AFS User Guide: Version 3.6</TH
74 >Appendix B. AFS Command Syntax and Online Help</H1
76 >The AFS commands available to you are used to authenticate, list AFS information, protect directories, create
77 and manage groups, and create and manage ACLs. There are three general types of commands available to all AFS
78 users: file server commands, protection server commands, and miscellaneous commands. This chapter discusses the
79 syntax of these AFS commands, the rules that must be followed when issuing them, and ways of accessing help
87 >AFS Command Syntax</A
91 Most AFS commands use the following syntax:</P
93 CLASS="programlisting"
98 >command_suite operation_code -switch</B
120 > indicates the general type of command and the server process that
121 performs the command. Regular AFS users have access to two main command suites and a miscellaneous set of commands:
136 > command suite is used to issue file server commands that
137 interact with the File Server process.</P
147 > command suite is used to issue protection-related
152 >The miscellaneous commands are not associated with any command suite.</P
162 > indicates the action that the command performs. Miscellaneous
163 commands have operation codes only.
167 >A command can have multiple <SPAN
173 >, which can be <SPAN
190 >Arguments are used to supply additional information for use by the command.
193 They consist of a paired <SPAN
210 A switch defines the type of argument and is always preceded
211 by a hyphen; arguments can take multiple instances if a plus sign (+) appears after the instance. An instance
212 represents some variable piece of information that is used by the command. Arguments can be optional or
217 >Flags are used to direct a command to perform in a specific way (for example, to generate a
218 specific type of output).
220 Flags are always preceded by a hyphen and are always
230 >Command Syntax Example</A
233 >In the following AFS command</P
235 CLASS="programlisting"
240 >fs setacl -dir $HOME -acl pat all terry none -negative</B
253 > is the command suite.</P
270 the File Server process to set an access control list.</P
284 >-acl pat all terry none</B
317 > indicates the name of the directory on which to set the ACL, and
324 > defines the entries to set on it.</P
347 > of the arguments. <SPAN
354 defines a specific directory for the directory argument. The <SPAN
361 has two instances specifying two ACL entries: <SPAN
386 > is a flag; it directs the command to put the access
387 list entries on the negative rather than the normal permissions list.</P
398 >Rules for Using AFS Commands</A
401 >This section describes the rules to follow when using AFS commands.</P
411 >Separate each command element (command suite, operation code, switches, instances, and flags) with a space.
412 Multiple instances of an argument are also separated by a space.</P
414 >Type all AFS commands on one line, followed by a carriage return. Some commands in this document appear on
415 more than one line, but that is for legibility only.</P
423 >Abbreviations and Aliases for Operation Codes</A
426 >You can type operation codes in one of three ways:</P
430 >You can type the operation code in full.</P
434 >You can abbreviate the operation code to the shortest form that distinguishes it from the other
435 operation codes in its command suite.</P
439 >You can use the alias for the operation code, if one exists.</P
443 >For example, the <SPAN
449 > command can be issued as follows:</P
487 >IBM AFS Administration Reference</I
489 > provides information on the full and abbreviated
490 command syntax as well as any aliases for all of the commands discussed in this guide.</P
498 >Omitting Argument Switches</A
501 >You can omit an argument's switch if the command takes only one argument, or if the following conditions are
506 >All of the command's required arguments appear in the order prescribed by the syntax
511 >No switches are used on any arguments, even if they are in the correct order.</P
515 >There is only one value for each argument. The important exception to this condition is if the
516 final required argument accepts multiple values; in this case, it is acceptable to provide multiple values
517 without providing the switch.</P
521 >For example, the following two commands are equivalent:</P
523 CLASS="programlisting"
528 >fs setacl -dir /afs/abc.com/usr/terry/private -acl pat rl</B
535 >fs setacl /afs/abc.com/usr/terry/private pat rl</B
540 >However, the following is not an acceptable short form because the arguments are not in the prescribed
543 CLASS="programlisting"
548 >fs setacl -acl pat rl /afs/abc.com/usr/terry/private</B
559 >Shortening Switches and Flags</A
563 If you are required to use a switch, or if you decide to use a flag, you can often
564 shorten the name of that switch or flag provided that the shortened form still distinguishes it from the command's
565 other flags and switches.</P
567 >For example, when you issue the <SPAN
573 > command, you can abbreviate all of
574 the switches and flags of the command to their initial letter because they all begin with a different letter.
575 However, when you issue the <SPAN
594 > flag both begin with the
601 >, so the shortest unambiguous abbreviations are
622 >Shortening Directory References</A
626 Most AFS command arguments that require directory or pathnames instances accept one
627 or more of the following short forms:</P
631 >A single period (<SPAN
637 >) indicates the current working
648 >) indicate the parent directory of the current
649 working directory.</P
653 >The $HOME environment variable indicates the issuer's home directory.</P
657 >For example, if the user <SPAN
689 >) permissions on his home directory to his manager
702 > can issue the following
705 CLASS="programlisting"
710 >fs setacl -dir $HOME -acl pat rl</B
715 >If the current working directory is <SPAN
721 >'s home directory, he can issue the
722 following command.</P
724 CLASS="programlisting"
729 >fs setacl -dir . -acl pat rl</B
734 >Both of the previous examples are acceptable short forms for the following command:</P
736 CLASS="programlisting"
741 >fs setacl -dir /afs/abc.com/usr/terry -acl pat rl</B
753 >Commonly Used fs and pts Commands</A
756 >This section provides additional information on the commonly used AFS <SPAN
769 > commands. For more detailed information, see the <SPAN
774 Administration Reference</I
783 >About the fs Commands</A
792 > commands extend UNIX file system semantics by invoking file-related
793 functions that UNIX does not provide (setting access control lists, for example). Other
800 > commands help you control the performance of the Cache Manager running on your
801 local client machine.
813 > commands accept the optional <SPAN
820 flag. It has the same function as the <SPAN
826 > command: it prints a command's
827 online help message on the screen. Do not provide other options at the same time as this flag. It overrides them,
828 and the only effect of issuing the command is to display the help message.
832 >The privilege required for issuing <SPAN
838 > commands varies. The necessary
839 privileges for the <SPAN
845 > commands described in this guide include the
850 >Having certain permissions on a directory's access control list. For example, creating and
851 removing mount points requires <SPAN
889 >) permissions for the directory in
890 which the mount point resides.</P
894 >Belonging to the <SPAN
898 >system:administrators</B
902 HREF="c1444.html#HDRWQ50"
903 >Using the System Groups on ACLs</A
908 >No privilege. Many <SPAN
914 > commands simply list information and so do
915 not require any special privilege.</P
925 >About the pts Commands</A
934 > command suite is the interface through which you can create
935 protection groups and add members to them. System administrators who belong to a special system group called
940 >system:administrators</B
942 > group can manipulate any group, and also create the user and
943 machine entries that can belong to groups. Users who do not belong to the
948 >system:administrators</B
950 > group can always list the information associated with the
951 group entries they own, as well as their own user entries. Depending on the setting of an entry's privacy flags,
952 regular users can sometimes access and manipulate group entries in certain ways.</P
960 > commands accept optional arguments and flags. They are listed in the
961 command descriptions in the <SPAN
965 >IBM AFS Administration Reference</I
967 > and are described here in
985 > This argument indicates that the command runs in the indicated cell. The issuer can abbreviate the
989 > value to the shortest form that distinguishes it from the other cells
994 >/usr/vice/etc/CellServDB</B
996 > file on the client machine on which the
997 command is issued. By default, commands are executed in the local cell as defined
1002 >First, by the value of the environment variable AFSCELL. (This variable is normally not
1003 defined by default. If you are working in another, nonlocal cell for an extended period of time, you can set
1004 the variable to the name of that cell.)</P
1008 >Second, in the <SPAN
1012 >/usr/vice/etc/ThisCell</B
1014 > file on the client
1015 machine on which the command is issued.</P
1022 CLASS="variablelist"
1034 >This flag directs the <SPAN
1040 > command interpreter to continue
1041 executing the command, if possible, even if it encounters problems during the command's execution.
1044 The command interpreter performs as much of the requested operation as possible, rather
1045 than halting if it encounters a problem. The command interpreter reports any errors it encounters during the
1046 command's execution. This flag is especially useful if you provide many instances for an argument; if one of the
1047 instances is invalid, the command reports the error and proceeds with the remaining
1053 CLASS="variablelist"
1070 >This flag has the same function as the <SPAN
1077 prints the command's online help message on the screen. Do not provide other options at the same time as this
1078 flag. It overrides them, and the only effect of issuing the command is to display the help
1091 >Getting Help in AFS</A
1094 >AFS online help consists of basic syntax messages. The AFS distribution also includes help in HTML format
1095 which your system administrator can make available to you.</P
1102 >Displaying Command Syntax and Aliases</A
1105 >To display a brief description of a command, its syntax statement, and alias if any, use the
1112 > operation code. For example, to display the online help entry for the
1119 > command, enter the following command:</P
1121 CLASS="programlisting"
1129 fs listacl: list access control list
1131 Usage: fs listacl [-path <dir/file path>+] [-id] [-if] [-help]
1134 >To display the syntax statement only, use the <SPAN
1140 > flag, which is available
1141 on most AFS commands. For example, to display the syntax statement for the <SPAN
1148 > command, enter the following command:</P
1150 CLASS="programlisting"
1158 Usage: fs setacl -dir <directory>+ -acl <access list entries>+ [-clear] [-negative]
1168 >Displaying Operation Code Descriptions</A
1171 >To display a short description of all of a command suite's operation codes, issue the
1178 > operation code without any other arguments. For example, the
1185 > command displays a short description of every operation code in the
1196 >To display a list of the commands in a command suite that concern a certain type of object, provide a
1197 relevant keyword argument to the <SPAN
1203 > operation code. For example, if you want
1204 to set an ACL but cannot remember which <SPAN
1210 > command to use, issue the following
1213 CLASS="programlisting"
1221 setacl: set access control list
1222 setcachesize: set cache size
1223 setcell: set cell status
1224 setclientaddrs: set client network interface addresses
1225 setquota: set volume quota
1226 setserverprefs: set file server ranks
1227 setvol: set volume status
1228 sysname: get/set sysname (i.e. @sys) value
1231 >The following message indicates that there are no commands whose names or descriptions include the keyword
1232 string you have provided:</P
1234 CLASS="programlisting"
1235 > Sorry, no commands found
1244 >If the keyword you provide has spaces in it, enclose it in double quotes (<SPAN
1262 SUMMARY="Footer navigation table"
1301 >Using the NFS/AFS Translator</TD