|
SECTION 5 SEGMENTS A segment is a collection of information identified by a pathname. A single segment may contain any amount of information, from none to over one million printed characters. As a new user, you will be working with ASCII segments. An ASCII segment contains information that can be printed on a terminal, for instance a list of names or a section of a manual. A non-ASCII segment cannot successfully be printed on a terminal: it would appear as strings of digits and backslashes. There are many commands on Multics that enable you to work with both your own segments and those of other users. In this section you are introduced to several commands that help you manipulate your segments. VIEWING SEGMENTS The print Command One of the most common commands used with segments is the print command (short name "pr"), introduced in Section 3. Here is the syntax line again:
Try printing one of your segments using one or both of the optional arguments. Another way to see your segment is to use an editing command, as you did to create your segments. For example:
The dprint Command Another way to receive a printed copy (a dprint) of your segment is to use the dprint command (dp). This command orders a copy of your segment to be printed, not at your terminal, but on a high-speed printing device called a line printer. The syntax line for the dprint command is:
Two useful control arguments to this command are:
prints 2, 3, or 4 copies, whichever you specify in place of N. If you do not use this control argument, you receive 1 copy (in other words, 1 is the default value for N).
allows you to specify where the dprint is to be sent. You type the address as an argument to the -ds control argument; if you want to include blanks, you must enclose the entire address in quotation marks, as indicated above. If you do not use this control argument, the default address is your Project_id. Your site may require that you include the -ds control argument with a particular value, in order to aid in delivery. Check with your project administrator to see if this is required at your site. The order in which you type arguments is significant with this command: you should type the pathname AFTER you type all the control arguments. Here is a complete sample dprint interaction:
The message sent by Multics displays the number of dprints Pam requested, and informs her of the number of requests already in line (in "queue 3") waiting to be dprinted. Find out where you can have dprints delivered, and try dprinting a segment. NAMING SEGMENTS As you saw when you created segments with an editor, you provide a name for each of your segments. You may add extra names, called alternate names, to the original name of your segment with the add_name command (an). The syntax line for the add_name command is:
The path argument is your segment's original pathname, and namel is an alternate name; "{... nameN}" means that you can also add as many alternate names as you wish. For example:
In this example, two alternate names - "polliwog" and "amphibian" - are added to the segment "tadpole". It is also possible to rename a segment, with the rename command (rn). Its syntax line is:
and it allows only one new name ("frog") to replace the old name ("tadpole"):
The rename command has no effect on any alternate names your segment might have: the alternate names remain with the segment. If you decide that one (or more) of the names of a segment in not appropriate, you may delete it with the delete_name command (dn):
Here is an example:
Now the segment "frog" has only one alternate name: "amphibian". Deleting the names of a segment is quite different from deleting the segment itself. You may delete as many names as you want, as long as you do not delete every name from the segment. A segment must have at least one name though, so if you accidentally attempt to delete every name, you receive a warning message:
The first name listed on the above command line does get deleted, though. SEGMENT ATTRIBUTES The names of a segment are considered to be among Its attributes, or characteristics. Other attributes of a segment are the author, the length, and the access modes: what permission you have to see, change, and add to your segment (access information is described in Section 7, "Access"). The list command (ls) gives you information about several attributes of your segments. The list command syntax line is:
When you include the name of a segment on the list command line, you receive information concerning three attributes of that segment. Here is a list of the attributes of the segment "Doggerel":
The list command response begins with a header line that gives the total number of segments and the sum of their sizes. On the next line, the first group of letters ("r w") identifies what combination of the three access modes you are permitted on the segments. Here you have permission to read (see) your segment and write (edit) it. The second attribute ("1") is the size of your segment, in pages. A page of a segment is up to or exactly 4096 characters. The third attribute is the list of names for the segment, in this case the one name "Doggerel". When you type the list command with no arguments, you get a list like the one described above, except that it includes information about all of your segments. It also begins with a header:
The last segment listed is Pam's mailbox. The absence of access attributes, and the "0" length, do not mean that you have no mail now. They signify that you cannot use your mailbox segment with any standard commands (like print); you have access only through the mail facility commands. DELETING SEGMENTS Finally, to get rid of a segment that you no longer need, use the delete command (dl) with the name of a command:
When you delete a segment that has alternate names, they are automatically deleted too. Try creating a few practice segments. Add, change, and delete names and segments, using the list command to check what you have done. For information on seeing other people's segments, read Section 6, "Directories". To discover how to share your segments with other users, read Section 7, "Access".
<< Previous Section Next Section >> Contents | 1 | 2 | 3 | 4 | 5 | 6 | 7 | A | B
|