MSGS(1) BSD MSGS(1)
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, typically
read once by most system users.
Normally you invoke msgs at login by placing the command in the file
.login (.profile if you use /bin/sh).
msgs keeps message information in the file .msgsrc in your home
directory. It keeps a set of files whose names are the (sequential)
numbers of the messages they represent in the directory /usr/msgs. 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 are incorrect, remove the file; msgs
will make a new bounds file the next time it runs.
COMMANDS
msgs prompts you with the source and subject of each new message. If
there is no subject line, it 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 whether you wish to see the rest of the message. The
possible responses are
y (or <RETURN>) Display the rest of the message.
n Skip this message and go on to the next.
- Redisplay the last message.
q Exit msgs; resume examination of the message queue at
this point when the program is run again.
s (or s-) Append the current message to the file Messages in the
current directory. s- saves the previously displayed
message. You can follow either s or s- with a space and a
filename to receive the message.
m (or m-) Place a copy of the specified message in a temporary
mailbox and invoke mail(1) on that mailbox. Both m and s
accept a numeric argument in place of the dash (-).
You can also go to any specific message by typing its number when msgs
requests input.
OPTIONS
-f Suppress printing of "No new messages."
-h Display only the first part of messages.
-l Report only locally originated messages.
-p Pipe long messages through more(1).
-q Check for new messages only. If found, display "There are new
messages." This option is often used in log-in scripts.
number Start at the specified message rather than at the next message
indicated by your .msgsrc file.
-number Start number messages back from the one indicated by your
.msgsrc file. This option is useful for reviewing recent
messages.
-s Sets up the posting of messages. You should include the line
msgs: "| /usr/ucb/msgs -s"
in /usr/lib/aliases to enable posting of messages.
-c Performs cleanup on /usr/msgs. You should place an entry with
the -cn option in /usr/lib/crontab to run every night and
remove all messages over n days old. The default is 21 days.
FILES
/usr/msgs/* Database
~/.msgsrc Number of next message to be presented
SEE ALSO
aliases(5), crontab(5), mail(1), more(1)