SECTION 3

BASIC MULTICS COMMANDS

COMMAND CONVENTIONS

Nearly all work that you want to accomplish on Multics is conveyed by commands. There are over 400 commands, many of which you may never use, some that you will use often. Most commands share several established rules of usage called conventions. (Some commands do not conform to some conventions - exceptions are documented in the individual command descriptions, Appendix B.) Several basic commands are introduced to illustrate the concepts and conventions presented in this section.

Command Names

Multics differentiates between uppercase and lowercase letters. Command names are always typed in lowercase letters. For example, when you log in to the system you type "login". If Pam Sissle types "LOGIN" instead, Multics responds with an error message:

tmpCC-1.gif

Command names never contain blanks. Another way to say this is that a command name is always one character string: one group of alphabetic, numeric, and some special characters (periods, hyphens and underscores) unbroken by blanks. When two or more words are incorporated in one character string, an underscore is used to simulate blanks between words, as with the "send_message" command or the "-change_password" control argument.

Many command names have shortened versions, called short names, that can be used interchangeably with the full names. The login command has the shortest short name, "l" (the logout command has no short name). Pam Sissle can log in this way:

tmpCC-2.gif

Many of the most common control arguments have short names, too. Here is the full version and the shortened version of a login line from Section 2:

tmpCC-3.gif

Short names are given in command descriptions (Appendix B), next to the full names of those commands and control arguments that have shortened versions. In this manual, short names also appear in parentheses after command names.

Command Lines

A command line consists of a command name, any desired or necessary arguments (separated from each other by blanks), and a newline. You must use blanks to separate the name of the command from its arguments, and to separate arguments from each other. Multics processes command lines in the order that they were typed.

Every command line ends with a newline. The newline functions as a simultaneous carriage return (returning you to the beginning of the same line) and linefeed (dropping you to a new line). These two actions are a signal to Multics that you have completed a command line and want it acted on. The newline is sent to Multics by typing the key marked "RETURN" (some terminals have a different key for this function - check at your site for the correct key). The RETURN keys on most terminals act as newlines automatically; if your RETURN key does not (if you must accompany it with a linefeed to send your command line to Multics), see "Login Problems" in Section 2 or talk to your project administrator.

Stopping a Command

If you want to stop a command while it is acting, you can do so by issuing a QUIT signal. The who command provides a good example. The who command prints a list of all the users currently logged in, preceded by a Multics banner like the one you see when you log in. When you type "who" to find out who is logged in, you may not want to see the entire list of current users. As soon as the system displays the names you are interested in, you may issue a QUIT signal by pressing the "QUIT" key only (this key may be labeled BREAK, ATTN, or INTERRUPT on your terminal). When Multics receives the QUIT signal (there may be a short delay), it interrupts the command and displays a QUIT message:

tmpCC-4.gif

At this point, you are at command level 2; Multics has created a new command level for you. To return to command level 1, you should type release -all:

tmpCC-5.gif

When Multics prints a ready message with no level number, you are back at command level 1, which is where you started. For more information on the QUIT signal, see Part 2.

ARGUMENT CONVENTIONS

Arguments are character strings included on the command line that provide any information necessary for a command to act as you want it to. The way arguments are typed in a command line is shown on a syntax line in the individual command descriptions (Appendix B). A generalized example of a syntax line is:

tmpCC-6.gif

for as many arguments as the command accepts. Each command has its own list of the arguments that it can accept; these lists of arguments are also included in command descriptions.

One command may accept several different kinds of arguments; each kind is discussed below. When several arguments can be accepted on one command line, the order in which they are typed is often significant. (Such requirements are indicated in the syntax lines.) If you type arguments in the wrong order,or if you type fewer arguments than necessary for the command to do what you want, Multics usually sends you an error message pointing out your mistake:

tmpCC-7.gif

If your mistaken command is still understandable to Multics, the command acts on whatever information you gave it. In this case, the results will probably not be what you intended.

The Standard Argument

One kind of argument is called simply an argument. It can be any item on which the command performs its action. Thus, such items as numerical values, the Person_id, and the Project_id function as arguments when they are called for in a command line. You have already seen two examples of this kind of argument in the login command line:

tmpCC-8.gif

This syntax line in the "login" command description would be:

tmpCC-9.gif

followed by a description of what words could be used as the arguments - in this case the user's Person_id and Project_id.

These two arguments are required with the login command; if you don't include them you will receive a message reminding you to do so. Other arguments, those placed in braces on the syntax line, are optional. Here is an example of a command syntax line that includes an optional argument:

tmpCC-10.gif

The braces ({}) indicate that the enclosed argument is optional. If you type only "calendar" on the command line, the system prints out, at your terminal, a calendar of the current month. If you type the command name and a date of the form MM/DD/YY:

tmpCC-11.gif

you receive a calendar for the month you specified. (Note: you must be using a terminal that has 120 or more characters per line for the calendar to be printed correctly.)

Pathname Arguments

The most common kind of argument is the pathname argument. All information that you create and store on Multics is grouped into segments. For example, this section of this manual is stored in a segment named "section_3". You give your segments names, called pathnames, that tell the system where your segments are located. (Segments are discussed in more detail in Sections 4 and 5, and pathnames in Section 6.)

Many commands are designed to act on segments; for these commands, you provide the pathname of the appropriate segment on the command line. When you type the name of this segment as one of the arguments to a command, the system finds the segment by its pathname and gives it to the command to act on.

The syntax line for a command with a pathname argument is:

tmpCC-12.gif

or, if the pathname is optional:

tmpCC-13.gif

An example of a command that requires a pathname argument is the print command (short name "pr"), which prints a header and the text of Pam Sissle's segment "tadpole" at her terminal:

tmpCC-14.gif

In the print command, the order of arguments on a command line is significant. The print command takes two optional arguments: line numbers that specify where to begin and end printing. You give these arguments if you do not want your whole segment printed (when using line number arguments, the header is not printed). If you want to use these arguments, you must type them after the pathname. For example:

tmpCC-15.gif

This restriction is conveyed by the order of the arguments in the syntax line:

tmpCC-16.gif

Such restrictions are usually explained in the text of a command description.

Control Arguments

With all of the arguments described above, you replace the argument terras given in a syntax line - "Person_id", "date" - with the information you want the command to act on - "PSissle", "10/17/80". Control arguments represent the special features of a command. With control arguments, you always type the same control argument (preceded by a hyphen, of course) to get that particular modification. Because control arguments cause a command to act differently than it normally would, they are nearly always optional. See "Variations" in Section 2 for several examples of control arguments.

Control arguments rarely need to be typed in a given order. However, control arguments do sometimes take arguments themselves, and there may be various kinds of restrictions to this kind of argument. One example of a command with a control argument that takes an argument was shown in Section 2, "Login Problems":

tmpCC-17.gif

where the -modes control argument takes the character string "lfecho,crecho" as an argument. Restrictions on the order of control arguments in a command line are not revealed by the syntax line of the command description. For example, here is the syntax line of the set_tty command (short name "stty"):

tmpCC-18.gif

Such restrictions are explained in the description of the relevant control argument.

Default Arguments

The last kind of argument is the default argument, an argument that the system assumes is present if you have typed nothing but a command name on the command line. Default arguments are assumptions about what the user wants from a command. The print command (pr) offers a clear example of a default argument. If your segment named "tadpole" has 39 lines in it, then typing:

tmpCC-19.gif

is the same as typing:

tmpCC-20.gif

(except that the header is suppressed when you specify line numbers).

Very few commands have no arguments at all - many commands have default arguments.

COMMUNICATING WITH OTHER USERS

Multics offers several commands that allow you to communicate with other users. This facility - known as the mail facility - is very useful for such purposes as requesting permission to look at or use someone's segments, informing other users of upcoming events, or asking other users for assistance.

The mail facility commands are described below in two groups: message commands and mail commands. Message commands are intended primarily for interactive exchanges between two logged-in users. Mail commands provide the advantage of writing, sending and reading mail at your convenience, whether the other user is logged in or not. In order to receive either type of communication, you must have your own mailbox, a specially protected segment with the name Person_id.mbx (for example, Pain's mailbox is named PSissle.mbx). Your first use of the accept_messages command creates a permanent mailbox for you automatically.

Message Commands

RECEIVING MESSAGES

In order to receive upcoming messages from other users, you must type the accept_messages command (short name "am") each time you log in. In addition, to receive the messages that have been sent to your mailbox since you last logged out, include the -print control argument on the command line. The accept_messages command allows subsequent messages from other users to be printed at your terminal instantaneously. The User_id of the sender is included with each message, as well as the date and time:

tmpCC-21.gif

After your messages are printed at your terminal they are deleted from your mailbox.

Incoming messages are printed on your terminal regardless of what you may be working on. Although messages can interrupt you, they have no adverse effect on what you are doing. If you have only half a command line typed when a message arrives, simply read the message and then continue typing from where you were stopped - the message is not sent to the system as part of your command line. For example, here Pam receives a message while she is typing the who command. Notice that until Pam presses the newline, her command line is not sent to the system.

tmpCC-22.gif

If a message arrives while the system is printing out information, the message is printed and the system returns to printing as if nothing else had happened:

tmpCC-23.gif

There may be times when you don't want your work to be interrupted by messages. You can have your incoming messages collected and saved in your mailbox by typing the defer_messages command (dm). When you are ready to receive messages at your terminal, just type the accept_messages command, with the -print control argument, again.

You automatically stop accepting messages at your terminal when you log out. Remember that you should type this command:

tmpCC-24.gif

as soon as you log in each time. (You can have this done automatically after reading the "exec_com" section in Part 2.)

SENDING MESSAGES

Interactive messages are sent with the send_message command (sm). There are two ways to send messages, as the syntax line implies:

tmpCC-25.gif

For a short message, you can type the whole command line, including your message, on one line:

tmpCC-26.gif

You may want to type a long message. When you type just the command, the user_id, and a newline, the system responds with the word "Input:". Now you are in input mode, the second form of the send_message command. As long as you remain in input mode, each line you type is sent immediately to the user you specified. To leave input mode and return to command level, type a period as the first and only character on a line, and then type a newline. A ready message will follow:

tmpCC-27.gif

When you are in input mode, Multics expects normal text from you, rather than commands. It recognizes only the erase and kill characters as special symbols. You may therefore use any of the other special characters listed in Section 1 , even though you should not use them when your message is included on the command line. In fact, you may even type command lines as messages, and they won't be acted on. Here is an example of both these features:

tmpCC-29.gif

When you and another user both enter input mode, you can "chat" back and forth with each other:

tmpCC-28.gif

Remember the period that takes you out of input mode! The period is easy to forget, and when you do, you send command lines to another user instead of to the computer.

The send_message command is an interactive command, the same way that Multics is an interactive system. You talk to Multics using commands, and Multics responds with requested information and ready messages. An interactive command talks to you by means of prompts, like "Input:" or "Password:", and you talk to it using requests, like the period that terminates input mode in the send_nessage command. After you type the command line and a newline for interactive commands, you are at request level: the system expects either appropriate information (like messages or a password) or a request from that command's list of accepted requests.

Mail Commands

The mail commands, print_mail (prm) and send mail (sdm), are more complex interactive commands than the send message command. Both commands have their own sets of requests for use within the command. Your first use of print mail creates a permanent mailbox for you automatically, if you do not already have one.

Once you have a mailbox, you can receive mail as well as messages. Incoming mail always goes directly to your mailbox. If you are logged in and are accepting messages, you automatically get a notice each time new mail arrives:

tmpCC-30.gif

READING MAIL

You can read your mail at any time by typing the print_mail command (prm). The system tells you how many messages you have (within the mail facility, mail is referred to as messages), and prints the messages, with banners, one at a time. After each message is printed, the system sends you a prompting message and waits for you to type a request word in response. For example:

tmpCC-31.gif

Five requests are accepted in answer to the prompt:

yes

deletes that message and prints the next one

no

retains that message and prints the next one

reprint

repeats that message and the prompt

quit

retains that message and any messages not yet seen, and returns you to command level

abort

retains ALL current messages (even those you have deleted) and returns you to command level

Keep in mind that you may save mail in your mailbox as long as you want. When you have answered the prompts for each message, you are returned to command level. A complete example follows:

tmpCC-32.gif

Pam deleted her first message, read her second one, and returned to command level, so now she has two messages in her mailbox.

A useful control argument to the print_mail command is "-list", which prints a summary of your messages before printing the text of each one. Here is the summary of Pam's remaining messages:

tmpCC-33.gif

SENDING MAIL

To write and send mail, use the send_mail command (sdm). Because this is a powerful command, you may use it at any one of several levels of complexity. Two ways of using send_mail are shown here.

The easiest way to send mail is to type "send_mail" and the User_id of the person you want to write to. The command prompts you for a title and for the text of the mail; at this point you are at send_mail request level, in input mode. Conclude your mail in the same way as you terminate input mode when using the send_message command (sm): type a period as the first character on a line, and then type a newline. You now receive a message telling you that your mail has been sent, and you are returned to command level. This is how Jakob Kissle sent his first piece of mail to Pam Sissle:

tmpCC-34.gif

You may want to make changes to your mail before you send it. You can edit the message after you type it in, by typing "\f" (backslash-f) instead of a period when you end the message. Now you are in send_mail edit mode! It is very similar to the qedx edit mode, EXCEPT you do not need to use the "w" request - that is done automatically. (For information about qedx edit mode requests, read Section 4, "Creating and Editing Text".) To leave edit mode, type "q". Rather than returning you to command level, the send_mail command stays at request level. It allows you several choices by prompting you for a request. The three most useful requests are:

print

prints the mail you just typed

send

sends the mail to the mailbox of the user specified on the command line

quit

leaves send_mail request level and returns to command level.

Here is the way Jakob wrote his second piece of mail to Pam:

tmpCC-35.gif

A variety of other requests are available for both the send mail command (sdm) and the read mail command. (The read_mail command is more powerful than print_mail for manipulating your incoming mail.) When you are comfortable with the capabilities introduced here, try out some of the options listed in the descriptions of these commands in the MPM Commands.

HELP COMMANDS

The help Command

The help command is an extremely useful interactive command that enables you to obtain information at your terminal about any given Multics command. The syntax line of the help command is:

help {command_name} {-control_args}

Typing the help command with the name of another command (and no control arguments) causes Multics to begin printing the info segment about the command you requested: this is an "information segment" consisting of blocks of information about a given command. The first block informs you of how long that first block is, how long the entire info segment is, the full name and short name of the command, the date on which the command was last modified, and the syntax line and function of the command. After each block, Multics prints the title of the next block and asks you if you want more help:

tmpCC-36.gif

Some of the requests you may use are:

yes

print the next block

skip

skips the next block

rest

prints the rest of the info segment, and returns you to command level

quit

stops printing information, and returns you to command level

Two of the control arguments to the help command, added to the command line after you list the desired info segments, are also particularly useful:

-brief

prints a summary of the command information, including the syntax line and all arguments and control arguments

-all

prints the entire info segment without prompting you

Try the help command with the name of one of the other commands you have worked with. You can use it to remind yourself of the correct syntax line of a command, or to learn about arguments and control arguments not discussed in this manual.

The list_help Command

There are more than 500 info segments available to you at your terminal. The list_help command gives you a list of info segments that pertain to a given topic. The syntax line for this command is:

tmpCC-37.gif

It lists all the info segments whose names contain the given topic. For example, this command line:

tmpCC-38.gif

produces this list:

tmpCC-39.gif

Typing the list_help command with just the -all control argument:

tmpCC-40.gif

gives you a (very long) list of all the info segments.

 

<< Previous Section                                          Next Section >>

Contents | 1 | 2 | 3 | 4 | 5 | 6 | 7 | A | B