3 afs - Introduction to AFS commands
7 AFS provides many commands that enable users and system administrators to
8 use and customize its features. Many of the commands belong to the
9 following categories, called I<command suites>.
15 Interface for configuring and operating the AFS Backup System.
19 Interface to the Basic Overseer (BOS) Server for administering server
20 processes and configuration files.
24 Interface for administering access control lists (ACLs), the Cache
25 Manager, and other miscellaneous file system functions.
29 Interface for tracing Cache Manager operations when debugging problems.
33 Interface to the Authentication Server for administering security and
34 authentication information. This aspect of OpenAFS has been deprecated.
38 Interface to the Protection Server for administering AFS ID and group
39 membership information.
43 Interface for automated administration of user accounts. Deprecated, may
44 be removed from a future version of OpenAFS. See B<uss> man page for more
49 Interface to the Volume Server and Volume Location (VL) Server for
50 administering volumes.
54 In addition, there are several commands that do not belong to
57 =head2 AFS Command Syntax
59 AFS commands that belong to suites have the following structure:
61 I<command_suite> I<operation_code> B<-switch> <I<value>>[+] [B<-flag>]
65 Together, the I<command_suite> and I<operation_code> make up the I<command
68 The I<command_suite> specifies the group of related commands to which the
69 command belongs, and indicates which command interpreter and server
70 process perform the command. AFS has several command suites, including
71 B<bos>, B<fs>, B<kas>, B<pts>, B<uss> (deprecated) and B<vos>.
72 Some of these suites have an interactive mode in which the issuer omits the
73 I<operation_code> portion of the command name.
75 The I<operation_code> tells the command interpreter and server process
76 which action to perform. Most command suites include several operation
77 codes. The man pages for each command name describe each operation code in
78 detail, and the I<OpenAFS Administration Guide> describes how to use them
79 in the context of performing administrative tasks.
81 Several AFS commands do not belong to a suite and so their names do not
82 have a I<command_suite> portion. Their structure is otherwise similar to
83 the commands in the suites.
87 The term I<option> refers to both arguments and flags, which are described
88 in the following sections.
92 One or more arguments can follow the command name. Arguments specify the
93 entities on which to act while performing the command (for example, which
94 server machine, server process, or file). To minimize the potential for
95 error, provide a command's arguments in the order prescribed in its syntax
98 Each argument has two parts, which appear in the indicated order:
104 The I<switch> specifies the argument's type and is preceded by a hyphen
105 (B<->). For instance, the switch B<-server> usually indicates that the
106 argument names a server machine. Switches can often be omitted, subject to
107 the rules outlined in L<"Conditions for Omitting Switches">.
111 The I<value> names a particular entity of the type specified by the
112 preceding switch. For example, the proper value for a B<-server> switch is
113 a server machine name like C<fs3.example.com>. Unlike switches (which have a
114 required form), values vary depending on what the issuer wants to
115 accomplish. Values appear surrounded by angle brackets (C<< <> >>) in
116 command descriptions and the online help to show that they are
117 user-supplied variable information.
121 Some arguments accept multiple values, as indicated by trailing plus sign
122 (C<+>) in the command descriptions and online help. How many of a
123 command's arguments take multiple values, and their ordering with respect
124 to other arguments, determine when it is acceptable to omit switches. See
125 L<"Conditions for Omitting Switches">.
127 Some commands have optional as well as required arguments; the command
128 descriptions and online help show optional arguments in square brackets
133 Some commands have one or more flags, which specify the manner in which
134 the command interpreter and server process perform the command, or what
135 kind of output it produces. Flags are preceded by hyphens like switches,
136 but they take no values. Although the command descriptions and online help
137 generally list a command's flags after its arguments, there is no
138 prescribed order for flags. They can appear anywhere on the command line
139 following the operation code, except in between the parts of an
140 argument. Flags are always optional.
142 =head3 An Example Command
144 The following example illustrates the different parts of a command that
145 belongs to an AFS command suite.
147 % bos getdate -server fs1.example.com -file ptserver kaserver
155 B<bos> is the command suite. The BOS Server executes most of the commands
160 B<getdate> is the operation code. It tells the BOS Server on the specified
161 server machine (in this case C<fs1.example.com>) to report the modification
162 dates of binary files in the local F</usr/afs/bin> directory.
166 C<-server fs1.example.com> is one argument, with B<-server> as the switch and
167 C<fs1.example.com> as the value. This argument specifies the server machine on
168 which BOS Server is to collect and report binary dates.
172 C<-file ptserver kaserver> is an argument that takes multiple values. The
173 switch is B<-file> and the values are C<ptserver> and C<kaserver>. This
174 argument tells the BOS Server to report the modification dates on the
175 files F</usr/afs/bin/kaserver> and F</usr/afs/bin/ptserver>.
179 =head3 Rules for Entering AFS Commands
181 Enter each AFS command on a single line (press <Return> only at the end of
182 the command). Some commands in this document appear broken across multiple
183 lines, but that is for legibility only.
185 Use a space to separate each element on a command line from its
186 neighbors. Spaces rather than commas also separate multiple values of an
189 In many cases, the issuer of a command can reduce the amount of typing
190 necessary by using one or both of the following methods:
200 Using accepted abbreviations for operation codes, switches (if they are
201 included at all), and some types of values.
205 The following sections explain the conditions for omitting or shortening
206 parts of the command line. It is always acceptable to type a command in
207 full, with all of its switches and no abbreviations.
209 =head4 Conditions for Omitting Switches
211 It is always acceptable to type the switch part of an argument, but in
212 many cases it is not necessary. Specifically, switches can be omitted if
213 the following conditions are met.
219 All of the command's required arguments appear in the order prescribed by
220 the syntax statement.
224 No switch is provided for any argument.
228 There is only one value for each argument (but note the important
229 exception discussed in the following paragraph).
233 Omitting switches is possible only because there is a prescribed order for
234 each command's arguments. When the issuer does not include switches, the
235 command interpreter relies instead on the order of arguments; it assumes
236 that the first element after the operation code is the command's first
237 argument, the next element is the command's second argument, and so
238 on. The important exception is when a command's final required argument
239 accepts multiple values. In this case, the command interpreter assumes
240 that the issuer has correctly provided one value for each argument up
241 through the final one, so any additional values at the end belong to the
244 The following list describes the rules for omitting switches from the
245 opposite perspective: an argument's switch must be provided when any of
246 the following conditions apply.
252 The command's arguments do not appear in the prescribed order.
256 An optional argument is omitted but a subsequent optional argument is
261 A switch is provided for a preceding argument.
265 More than one value is supplied for a preceding argument (which must take
266 multiple values, of course); without a switch on the current argument, the
267 command interpreter assumes that the current argument is another value for
268 the preceding argument.
272 =head4 An Example of Omitting Switches
274 Consider again the example command from L<"An Example Command">.
276 % bos getdate -server fs1.example.com -file ptserver kaserver
278 This command has two required arguments: the server machine name
279 (identified by the B<-server> switch) and binary file name (identified by
280 the B<-file> switch). The second argument accepts multiple values. By
281 complying with all three conditions, the issuer can omit the switches:
283 % bos getdate fs1.example.com ptserver kaserver
285 Because there are no switches, the bos command interpreter relies on the
286 order of arguments. It assumes that the first element following the
287 operation code, C<fs1.example.com>, is the server machine name, and that the
288 next argument, C<ptserver>, is a binary file name. Then, because the
289 command's second (and last) argument accepts multiple values, the command
290 interpreter correctly interprets C<kaserver> as an additional value for
293 On the other hand, the following is not acceptable because it violates the
294 first two conditions in L<"Conditions for Omitting Switches">: even though
295 there is only one value per argument, the arguments do not appear in the
296 prescribed order, and a switch is provided for one argument but not the
299 % bos getdate ptserver -server fs1.example.com
301 =head3 Rules for Using Abbreviations and Aliases
303 This section explains how to abbreviate operation codes, option names,
304 server machine names, partition names, and cell names. It is not possible
305 to abbreviate other types of values.
307 =head4 Abbreviating Operation Codes
309 It is acceptable to abbreviate an operation code to the shortest form that
310 still distinguishes it from the other operation codes in its suite.
312 For example, it is acceptable to shorten B<bos install> to B<bos i>
313 because there are no other operation codes in the B<bos> command suite
314 that begin with the letter C<i>. In contrast, there are several B<bos>
315 operation codes that start with the letter C<s>, so the abbreviations must
316 be longer to remain unambiguous:
320 =item B<bos sa> for bos salvage
322 =item B<bos seta> for bos setauth
324 =item B<bos setc> for bos setcellname
326 =item B<bos setr> for bos setrestart
328 =item B<bos sh> for bos shutdown
330 =item B<bos start> for bos start
332 =item B<bos startu> for bos startup
334 =item B<bos stat> for bos status
336 =item B<bos sto> for bos stop
340 In addition to abbreviations, some operation codes have an I<alias>, a
341 short form that is not derived by abbreviating the operation code to its
342 shortest unambiguous form. For example, the alias for the B<fs setacl>
343 command is B<fs sa>, whereas the shortest unambiguous abbreviation is B<fs
346 There are two usual reasons an operation code has an alias:
352 Because the command is frequently issued, it is convenient to have a form
353 shorter than the one derived by abbreviating. The B<fs setacl> command is
358 Because the command's name has changed, but users of previous versions of
359 AFS know the former name. For example, B<bos listhosts> has the alias
360 B<bos getcell>, its former name. It is acceptable to abbreviate aliases
361 to their shortest unambiguous form (for example, B<bos getcell> to B<bos
366 Even if an operation code has an alias, it is still acceptable to use the
367 shortest unambiguous form. Thus, the B<fs setacl> command has three
368 acceptable forms: B<fs setacl> (the full form), B<fs seta> (the shortest
369 abbreviation), and B<fs sa> (the alias).
371 =head4 Abbreviating Switches and Flags
373 It is acceptable to shorten a switch or flag to the shortest form that
374 distinguishes it from the other switches and flags for its operation
375 code. It is often possible to omit switches entirely, subject to the
376 conditions listed in L<"Conditions for Omitting Switches">.
378 =head4 Abbreviating Server Machine Names
380 AFS server machines must have fully-qualified Internet-style host names
381 (for example, C<fs1.example.com>), but it is not always necessary to type the
382 full name on the command line. AFS commands accept unambiguous shortened
383 forms, but depend on the cell's name service (such as the Domain Name
384 Service) or a local host table to resolve a shortened name to the
385 fully-qualified equivalent when the command is issued.
387 Most commands also accept the dotted decimal form of the machine's IP
388 address as an identifier.
390 =head4 Abbreviating Partition Names
392 Partitions that house AFS volumes must have names of the form
393 F</vicepI<x>> or F</vicepI<xx>>, where the variable final portion is one
394 or two lowercase letters. By convention, the first server partition
395 created on a file server machine is called F</vicepa>, the second
396 F</vicepb>, and so on. The I<OpenAFS QuickStart Guide> explains how to
397 configure and name a file server machine's partitions in preparation for
398 storing AFS volumes on them.
400 When issuing AFS commands, you can abbreviate a partition name using any
401 of the following forms:
403 /vicepa = vicepa = a = 0
404 /vicepb = vicepb = b = 1
406 After /vicepz (for which the index is 25) comes
408 /vicepaa = vicepaa = aa = 26
409 /vicepab = vicepab = ab = 27
413 /vicepiv = vicepiv = iv = 255
415 F</vicepiv> is the last permissible AFS partition name. In practice it
416 will not work well; stopping with F</vicepiu> is highly recommended.
418 =head4 Abbreviating Cell Names
420 A cell's full name usually matches its Internet domain name (such as
421 B<example.org> for the Example Organization or C<example.com> for Example
422 Corporation). Some AFS commands accept unambiguous shortened forms,
423 usually with respect to the local F</usr/vice/etc/CellServDB file> but
424 sometimes depending on the ability of the local name service to resolve
425 the corresponding domain name.
427 =head3 Displaying Online Help for AFS Commands
429 To display online help for AFS commands that belong to suites, use the
430 B<help> and B<apropos> operation codes. A B<-help> flag is also available
431 on every almost every AFS command.
433 The online help entry for a command consists of two or three lines:
439 The first line names the command and briefly describes what it does.
443 If the command has aliases, they appear on the next line.
447 The final line, which begins with the string C<Usage:>, lists the
448 command's options in the prescribed order; online help entries use the
449 same typographical symbols (brackets and so on) as this documentation.
453 If no operation code is specified, the B<help> operation code displays the
454 first line (short description) for every operation code in the suite:
456 % <command_suite> help
458 If the issuer specifies one or more operation codes, the B<help> operation
459 code displays each command's complete online entry (short description,
460 alias if any, and syntax):
462 % <command_suite> help <operation_code>+
464 The B<-help> flag displays a command's syntax but not the short
465 description or alias:
467 % <command_name> -help
469 The apropos operation code displays the short description of any command
470 in a suite whose operation code or short description includes the
473 % <command_suite> apropos "<help string>"
475 The following example command displays the complete online help entry for
476 the B<fs setacl> command:
479 fs setacl: set access control list
481 Usage: fs setacl -dir <directory>+ -acl <access list entries>+
482 [-clear] [-negative] [-id] [-if] [-help]
484 To see only the syntax statement, use the B<-help> flag:
487 Usage: fs setacl -dir <directory>+ -acl <access list entries>+
488 [-clear] [-negative] [-id] [-if] [-help]
490 In the following example, a user wants to display the quota for her home
491 volume. She knows that the relevant command belongs to the B<fs> suite,
492 but cannot remember the operation code. She uses B<quota> as the keyword:
495 listquota: list volume quota
496 quota: show volume quota usage
497 setquota: set volume quota
499 The following illustrates the error message that results if no command
500 name or short description contains the keyword:
502 % fs apropos "list quota"
503 Sorry, no commands found
505 =head1 PRIVILEGE REQUIRED
507 Many AFS commands require one or more types of administrative
508 privilege. See the reference page for each command.
554 L<xfs_size_check(8)>,
560 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
562 This documentation is covered by the IBM Public License Version 1.0. It was
563 converted from HTML to POD by software written by Chas Williams and Russ
564 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.