Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ msgs(1) — Duplix 5.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

aliases(5)

crontab(5)

mail(1)

more(1)

MSGS(1)  —  Unix Programmer’s Manual

NAME

msgs − system messages and junk mail program

SYNOPSIS

msgs [ −fhlpq ] [ number ] [ −number ]

msgs −s

msgs −c [ −days ]

DESCRIPTION

Msgs is used to read system messages.  These messages are sent by mailing to the login ‘msgs’ and should be short pieces of information which are suitable to be read once by most users of the system. 

You can invoke msgs each time you login by placing it in the file .login (.profile if you use /bin/sh).  When invoked, msgs prompts you with the source and subject of each new message.  If there is no subject line, msgs displays the first few non-blank lines of the message.  If there is more to the message, msgs tells you how long it is and asks you whether you wish to see the rest of the message.  The possible responses appear in the COMMANDS section below. 

Msgs keeps track of the next message you will see by a number in the file .msgsrc in your home directory.  In the directory /usr/msgs it keeps a set of files whose names are the (sequential) numbers of the messages they represent.  The file /usr/msgs/bounds shows the low and high number of the messages in the directory so that msgs can quickly determine if there are no messages for you.  If the contents of bounds is incorrect, you can fix the problem by removing the file; msgs will make a new bounds file the next time it is run. 

Within msgs you can go to any specific message by typing its number when msgs requests input as to what to do. 

COMMANDS

− Redisplays the last message. 

<RETURN>
Performs the same function as y. 

m or m−
Causes a copy of the specified message to be placed in a temporary mailbox and mail(1) to be invoked on that mailbox.  Both m and s accept a numeric argument in place of the ‘−’. 

n Skips the current message and proceeds to the next message. 

q Exits msgs.  The next time you run msgs it will pick up where you left off. 

s Appends the current message to the file “Messages” in the current directory.  s- saves the previously displayed message. If you follow s or s- with a space and a filename, msgs writes the message into the specified file rather than into the default “Messages”. 

y Types the rest of the message. 

OPTIONS

Options when reading messages include:

−f Suppresses the message “No new messages.” when there are no system messages.  This option is useful in your .login file since often there are no messages. 

−h Causes msgs to print the first part of messages only. 

−l Causes only locally originated messages to be reported. 

−p Causes long messages to be piped through more(1). 

−q Queries whether there are messages, printing “There are new messages.” if there are.  The command “msgs −q” is often used in login scripts. 

number
Causes msgs to start at the message whose number is number rather than at the next message indicated by your .msgsrc file.  Thus

          msgs −h 1

prints the first part of all messages. 

−number
Causes msgs to start number messages back from the one indicated by your .msgsrc file, useful for reviews of recent messages. 

Other options include:

−c [ -days ]
Performs cleanup on /usr/msgs. An entry with the −c option should be placed in /usr/lib/crontab to run every night.  This will remove all messages over 21 days old.  You can set a different expiration on the command line to override the default. 

−s Sets up the posting of messages.  The line

          msgs: "| /usr/ucb/msgs −s"

should be included in /usr/lib/mail/aliases to enable posting of messages. 

FILES

/usr/msgs/∗database
~/.msgsrcnumber of next message to be presented

SEE ALSO

aliases(5), crontab(5), mail(1), more(1)

4th Berkeley Distribution  —  October 26, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026