This section describes the rules to follow when using AFS commands.
Separate each command element (command suite, operation code, switches, instances, and flags) with a space. Multiple instances of an argument are also separated by a space.
Type all AFS commands on one line, followed by a carriage return. Some commands in this document appear on more than one line, but that is for legibility only.
You can type operation codes in one of three ways:
You can type the operation code in full.
You can abbreviate the operation code to the shortest form that distinguishes it from the other operation codes in its command suite.
You can use the alias for the operation code, if one exists.
For example, the fs listacl command can be issued as follows:
fs listacl (full command)
fs lista (abbreviation)
fs la (alias)
The OpenAFS Administration Reference provides information on the full and abbreviated command syntax as well as any aliases for all of the commands discussed in this guide.
You can omit an argument's switch if the command takes only one argument, or if the following conditions are met.
All of the command's required arguments appear in the order prescribed by the syntax statement.
No switches are used on any arguments, even if they are in the correct order.
There is only one value for each argument. The important exception to this condition is if the final required argument accepts multiple values; in this case, it is acceptable to provide multiple values without providing the switch.
For example, the following two commands are equivalent:
% fs setacl -dir /afs/abc.com/usr/terry/private -acl pat rl % fs setacl /afs/abc.com/usr/terry/private pat rl
However, the following is not an acceptable short form because the arguments are not in the prescribed order:
% fs setacl -acl pat rl /afs/abc.com/usr/terry/private
If you are required to use a switch, or if you decide to use a flag, you can often shorten the name of that switch or flag provided that the shortened form still distinguishes it from the command's other flags and switches.
For example, when you issue the fs setacl command, you can abbreviate all of the switches and flags of the command to their initial letter because they all begin with a different letter. However, when you issue the knfs command, the -host argument and -help flag both begin with the letter h, so the shortest unambiguous abbreviations are -ho and -he respectively.
A single period (.) indicates the current working directory.
Two periods (..) indicate the parent directory of the current working directory.
The $HOME environment variable indicates the issuer's home directory.
For example, if the user terry wants to grant r (read) and l (lookup) permissions on his home directory to his manager pat, terry can issue the following command.
% fs setacl -dir $HOME -acl pat rl
If the current working directory is terry's home directory, he can issue the following command.
% fs setacl -dir . -acl pat rl
Both of the previous examples are acceptable short forms for the following command:
% fs setacl -dir /afs/abc.com/usr/terry -acl pat rl