• Aucun résultat trouvé

The MAILBOX/MSG Commands

Dans le document User's THEOS/OASIS (Page 118-127)

These commands apply only to the multi user version of THEOS since messages must be sent to or received by more than one system user. Neither command has a privilege level associated with it.

THE MAILBOX COMMAND

This command allows the retrieval of messages sent to a user while he was logged off the system. The format of the MAILBOX command

IS:

118 THEOS User's Handbook

MAILBOX

MAILBOX displays the message sent to the account name the user is currently logged onto. The message sent to this account is automatically removed from the system once this command has been executed.

HOW TO USE THE MAILBOX COMMAND

This command is most frequently executed at the start of a new business day. The system manager is probably in the office before everyone else and may have messages for all users. MAILBOX is executed at the time of first LOGON as follows:

"->LOGON WALT<RETURN>

You have messages waiting. To retrieve, execute MAl LBOX

>MAILBOX <RETURN>

From: SYSTEM, 08:30 12/18/84

\... This is a test of the THE~S message system .... Bye.

THE MSG (MESSAGE) COMMAND

This command provides a means of sending a message to another user. The format of the MSG command is:

MSG ACCOUNTNAME TEXT

ACCOUNTN;\ME is the account name to which the message is to be sent. An ac(;ount name of

*

(asterisk) tells THEOS that the message is to be sent to all users, including the sender. In order to send a message to all users, you must have a privilege level of 5.

TEXT is the actual message which is to be sent. If the text does not follow the ACCOUNTNAME, THEOS allows mUltiple lines of text to be entered. The end of the message is indicated by a blank line and pressing <RETURN

>.

When the MSG command is executed, the message sent will immediately be displayed on the screens of currently logged on users.

The message does not interfere with any application software currently in use. If the message "User is not logged on." is displayed on the sender's screen, the MSG command will ask: "Do you wish to dep-osit into the mailbox?" You can choose Y or N and press

<RETURN>.

HOW TO USE THE MSG COMMAND

The MSG command serves as a convenient method of communi-cation in a office where the terminals are separated by large distances.

It also serves as an instant prompt or reminder of functions to be performed by the system manager or user.

Example 1:

r;MSG USER1 Staff meeting at 9:30 ... Send message when yo"J arrive. <RETURN>

User is not logged on

Do you wish to deposit into the mailbox? Y<RETURN>

">

~ ~

The preceding example illustrates the entry of a short message text directly following the account name which is to receive the message.

Since the user is not currently logged on, you are asked if the message is to be deposited in the mailbox. After the message is deposited, you are returned to the THEOS prompt.

Example 2:

>MSG * <RETURN>

Enter message text, terminate input by empty line.

?Single user mode in 10 minutes.<RETURN>

?Please finish what you are doing and 10goff<RETURN >

?the system as soon as possible. <RETURN>

?<RETURN>

>

The preceding example illustrates the procedure for sending a message to all logged on users. Since this message is to be a multi-line message, no text is entered after the *, and THEOS prompts you to begin entering text. After the message is entered, the RETURN key is pressed on an empty line indicating the end of the message.

120 THEOS User's Handbook

SUMMARY

The MAILBOX/ MSG commands provide a convenient method of sending messages to THEOS users. MAILBOX is executed when a user wishes to retrieve messages deposited in the mailbox. MSG is executed when a user wishes to send messages to another user.

Session 15: The RENAME Command

On occasion, it may be necessary to change the filename or filetype of a file, or change its protection status. The RENAME command allows the THEOS user to change a file's description (file-name and filetype) and/ or protection status. This command only operates on files on the currently logged account.

A file's protection status is defined as follows:

• delete protection

• write protection

• read protection

Delete protection means that a file may not be either deleted (erased) from the disk or renamed without first changing its protection status.

Write protection means that a file may not be updated without first changing its protection status. Write protected files can be erased.

A read protected file cannot be listed, edited, removed or manipulated in any manner. This type of protection status is generally used only by THEOS programmers to protect their programs.

THEOS files are generally assigned some type of protection, usually delete and write protection, so as to avoid accidental erasure of important files and to prevent changing (updating) of certain files by inexperienced users. Protection status is usually assigned by the system manager. A privilege level of I is required to use this command.

The format of the RENAME command is:

RENAME FILENAME.FILETYPE DRIVNAME NEWFILE.NEWTYPE DRIVNAME (options

FILEN AME is the current file name. FILETYPE is the current file type. DRIVNAME is the current drive. NEWFILE is the new

filename. NEWTYPE is the file type. DRIVNAME is the name of the drive where the new file is to be located.

Although the use of wildcard characters is allowed when using RENAME, it is best not to use them to avoid any ambiguity. We will provide examples of how to use the REN Ar ~E command with and without wildcards.

Option Function

DELETE The file is to be protected from erasure. The file can-not be deleted or renamed without changing its pro-tection status.

NODELETE This option removes a file's delete protection status.

NOQUERY When this option is specified, the system manager is not asked on a file-by-file basis if it is ok to rename the file.

NOWRITE Write protection is to be removed from a file.

QUERY The system manager is asked on a file-by-file basis if it is ok to rename a file. This is a default option when any wildcard characters are used.

Figure 4.29. The RENAME command options

DEFAULT OPTIONS

• NOQUERY is a default option when the FILENAME and FILETYPE are specified.

• QUERY is a default option unless FILENAME, FILE-TYPE, NEWFILE, and NEWTYPE are specified.

• All operations are automatically displayed on the screen.

USING THE RENAME COMMAND

Suppose you entered the following RENAME command:

>RENAME SYSTEM.ERRMSG S (NOW<RETURN>

SYSTEM.ERRMSG:S protection: DELETE, NOWRITE

>

122 THEOS User's Handbook

Here we have changed the protection status of a file called SYS-TEM.ERRMSG. As supplied by the THEOS vendor, this file has both delete and write protection. In order to make any changes to this file, the write protection status must be removed so the file can be rewritten.

Let's examine another RENAME command entry:

(

RENAME USER1.EXEC S USER2.=<RETURN>

USER1.EXEC:S renamed USER2.EXEC:S

)

This example changes a file named USERI EXEC to USER2 EXEC. The equal sign (wildcard character) means that the new file type is to be the same as the old file type ... EXEC. Because the descrip-tions of the files were specific the default option in this case was NOQUER Y. Remember the contents of the files were identical. RE-NAME has only changed the name of the file.

Suppose there are some data files on the system that are not to be changed or deleted. Type:

r

>RENAME *.DATA S (DELETE WRITE<RETURN> """

FILE1.DATA:S Okay to change protection (Y/N)?Y<RETURN>

FILE1.DATA:S protection: DELETE, WRITE

FILE2.DATA:S Okay to change protection (YIN)? N<RETURN>

FILE3.DATA:S Okay to change protection (Y/N)?Y<RETURN>

FILE3.DATA:S protection: DELETE, WRITE

~ ~

Wildcards were used because it was not certain how many data files were involved. THEOS searched the S drive to locate all files with a file type of DATA. Because a wildcard was used as part of the file description, the QUERY option was automatically in effect. As can be seen, THEOS prompts for an indication whether or not protection status of the file is to be changed. In one instance a response of N was recorded. THEOS ignored that file and moved on to the next file matching the description. After all files matching the description were located, the user is returned to the THEOS prompt.

SUMMARY

The RENAME command provides two functions:

• Changing a file's protection status.

• Renaming an old file description.

Certain files that are part of the THEOS operating system like the SYSTEM.ERRMSG file are both write and delete protected. When such a file's contents must be changed, the RENAME command must be used to change its protection status.

Session 16: The ERASE Command

N ow that we have had a chance to examine some of the commands that involve file and disk operations, it is appropriate that we begin our discussion of the THEOS command that permits the erasure of files.

The ERASE command is capable of erasing any file stored on any disk provided that the file is not delete protected. If you need to erase a file that is delete protected, you must first change the protection status using the RENAME command. A privilege level of 1 is required to use ERASE.

The format of the ERASE command is:

ERASE FILENAME FILETYPE DRIVNAME (options

FILEN AME is the file name to be erased. FILETYPE is the file type to be erased. DRIVNAME is the drive where the file is located.

The use of wildcards with this command is convenient and is illustrated in the subsequent examples.

Option Function

TYPE FILENAME;"FILETYPE and DRIVNAME to be erased are displayed on the screen before erasure.

This is the default option.

QUERY The system manager is asked on a file-by-file basis if it is ok to erase a file. This is the default option when wildcards are used.

NOQUERY The system manager is not asked if it is ok to erase a file. This is the default option when no wildcards are used.

Figure 4.30. ERASE command options

124 THEOS User's Handbook

USING THE ERASE COMMAND

Before executing the ERASE command it may be helpful to execute a FILELIST command. FILELIST will provide a listing of files on the currently logged account. These can be selected for possible erasure.

The ERASE command options are designed to protect against accidental file erasure. The following examples will illustrate this feature.

For example, suppose you were to type:

>ERASEUSECOMMAND<RETURN>

USE.COMMAND:S, OK to erase (Y/N)?N<RETURN>

No fi les erased.

'>

In this example FILENAME and FILETYPE are specified, but the drive where the file is located is not. THEOS automatically searches all attached disks. When it finds a file which matches the description typed, THEOS asks if it has found the correct file. Any response other than Y causes THEOS to respond that no files have been erased.

Let's examine another usage of ERASE. Suppose you were to type:

r~---~~

>ERASE USE COMMAND<RETURN>

USE.COMMAND:S, OK to erase (Y IN)?Y<RETURN>

USE.COMMAND:S erased

I file(s) erased, 3 block(s) recovered.

>

This is identical to our previous example except that Y is entered in response to the prompt. After the <RETURN> key is pressed, THEOS erases the file and displays a message to that effect, along with the total number of files erased and the amount of disk space recovered which can be reused.

Let's see what happens when wildcard characters are indicated with ERASE. If you were to type:

>ERASE XYZ*.* S<RETURN>

THEOS searches the S disk for a FILENAME of XYZ and a FILETYPE of

*.

Since no files on the S disk were found matching that description, no files were erased.

Suppose you entered ERASE with *. * specified as the FILE-NAME and FILETYPE as follows:

,- >ERASE *.* A<RETURN> ...,

FILE1.COMMAND:A Okay to erase (YIN)? Y<RETURN>

FILE1.COMMAND:A Protected

FILE2.DATA:A Okay to erase (Y/N)?Y<RETURN>

FILE2.DATA:A erased

FILE3.BASIC:A Okay to erase (Y/N)?Y<RETURN>

FILE3.BASIC:A erased

2 file(s) erased, 12 block(s) recovered.

~> ~

Note that drive A was specified. The first file located was pro-tected causing THEOS to ignore the request to erase it. A total of two files were erased, and twelve disk blocks were recovered for reuse.

Let's examine one more ERASE example:

>ERASE USE COMMAND S (NOQ<RETURN>

USE.COMMAND:S erased

1 file(s) erased, 3 block(s} recovered.

Note the use of the N OQ UER Y option. In order for this option to work, FILENAME, FILETYPE, and DRIVNAME must be specified.

The use of options with ERASE is far more limited than with the other THEOS commands. The reason should be clear ... to avoid accid-ental erasure of files. Special caution should be exercised when the system manager is erasing files belonging to the system account. Files in the system account are public and as such every THEOS user has access to them.

WHEN TO USE THE ERASE COMMAND

The ERASE command is used when files become outdated or are no longer used. This applies mostly to application programs no longer

126 THEOS User's Handbook

in use or data files created by those programs. Some application programs provide a menu option for erasing unwanted or unused files.

Whenever those choices are available, use them rather than ERASE.

When no povisions for erasing files have been furnished, as is the case with most word processing software, the ERASE command is the only means of erasing unused files.

SUMMARY

The ERASE command provides a means of erasing files belong-ing to the currently logged account. The command is designed such that the user is protected against the accidental erasure of files. Many software packages provide menu selections which provide for erasure of selected files. The ERASE command is recommended for use in those situations where unused files are occupying space which could be used for more current data.

Dans le document User's THEOS/OASIS (Page 118-127)