Appendix B. OpenAFS Command Syntax and Online Help

Table of Contents

OpenAFS Command Syntax
Command Syntax Example
Rules for Using OpenAFS Commands
Spaces and Lines
Abbreviations and Aliases for Operation Codes
Omitting Argument Switches
Shortening Switches and Flags
Shortening Directory References
Commonly Used fs and pts Commands
About the fs Commands
About the pts Commands
Getting Help in AFS
Displaying Command Syntax and Aliases
Displaying Operation Code Descriptions

The AFS commands available to you are used to authenticate, list AFS information, protect directories, create and manage groups, and create and manage ACLs. There are three general types of commands available to all AFS users: file server commands, protection server commands, and miscellaneous commands. This chapter discusses the syntax of these AFS commands, the rules that must be followed when issuing them, and ways of accessing help relevant to them.

OpenAFS Command Syntax

Most AFS commands use the following syntax:

   command_suite operation_code -switch <value>[+]  -flag

The command suite indicates the general type of command and the server process that performs the command. Regular AFS users have access to two main command suites and a miscellaneous set of commands:

  • The fs command suite is used to issue file server commands that interact with the File Server process.

  • The pts command suite is used to issue protection-related commands.

  • The miscellaneous commands are not associated with any command suite.

The operation code indicates the action that the command performs. Miscellaneous commands have operation codes only.

A command can have multiple options, which can be arguments or flags:

  • Arguments are used to supply additional information for use by the command. They consist of a paired switch and instance. A switch defines the type of argument and is always preceded by a hyphen; arguments can take multiple instances if a plus sign (+) appears after the instance. An instance represents some variable piece of information that is used by the command. Arguments can be optional or required.

  • Flags are used to direct a command to perform in a specific way (for example, to generate a specific type of output). Flags are always preceded by a hyphen and are always optional.

Command Syntax Example

In the following AFS command

   % fs setacl -dir $HOME -acl pat all terry none -negative
  • fs is the command suite.

  • setacl is the operation code, which directs the File Server process to set an access control list.

  • -dir $HOME and -acl pat all terry none are arguments.

    • -dir and -acl are switches; -dir indicates the name of the directory on which to set the ACL, and -acl defines the entries to set on it.

    • $HOME and pat all terry none are instances of the arguments. $HOME defines a specific directory for the directory argument. The -acl argument has two instances specifying two ACL entries: pat all and terry none.

  • -negative is a flag; it directs the command to put the access list entries on the negative rather than the normal permissions list.