BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / msgs.0
MSGS(1) UNIX Programmer's Manual MSGS(1)
N\bNA\bAM\bME\bE
msgs - system messages and junk mail program
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
m\bms\bsg\bgs\bs [ -\b-f\bfh\bhl\blp\bpq\bq ] [ number ] [ -number ]
m\bms\bsg\bgs\bs -\b-s\bs
m\bms\bsg\bgs\bs -\b-c\bc [ -days ]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bM_\bs_\bg_\bs 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.
_\bM_\bs_\bg_\bs is normally invoked each time you login, by placing it
in the file ._\bl_\bo_\bg_\bi_\bn (._\bp_\br_\bo_\bf_\bi_\bl_\be if you use /_\bb_\bi_\bn/_\bs_\bh). It will
then prompt you with the source and subject of each new mes-
sage. If there is no subject line, the first few non-blank
lines of the message will be displayed. If there is more to
the message, you will be told how long it is and asked
whether you wish to see the rest of the message. The possi-
ble responses are:
y\by type the rest of the message.
RETURN synonym for y.
n\bn skip this message and go on to the next message.
-\b- redisplay the last message.
q\bq drops you out of _\bm_\bs_\bg_\bs; the next time you run the pro-
gram it will pick up where you left off.
s\bs append the current message to the file ``Messages''
in the current directory; `s-' will save the previ-
ously displayed message. A `s' or `s-' may be fol-
lowed by a space and a file name to receive the mes-
sage replacing the default ``Messages''.
m\bm or `m-' causes a copy of the specified message to be
placed in a temporary mailbox and _\bm_\ba_\bi_\bl(1) to be
invoked on that mailbox. Both `m' and `s' accept a
numeric argument in place of the `-'.
_\bM_\bs_\bg_\bs keeps track of the next message you will see by a
number in the file ._\bm_\bs_\bg_\bs_\br_\bc in your home directory. In the
directory /_\bu_\bs_\br/_\bm_\bs_\bg_\bs it keeps a set of files whose names are
the (sequential) numbers of the messages they represent.
The file /_\bu_\bs_\br/_\bm_\bs_\bg_\bs/_\bb_\bo_\bu_\bn_\bd_\bs shows the low and high number of
Printed 7/9/88 May 9, 1986 1
MSGS(1) UNIX Programmer's Manual MSGS(1)
the messages in the directory so that _\bm_\bs_\bg_\bs can quickly
determine if there are no messages for you. If the contents
of _\bb_\bo_\bu_\bn_\bd_\bs is incorrect it can be fixed by removing it; _\bm_\bs_\bg_\bs
will make a new _\bb_\bo_\bu_\bn_\bd_\bs file the next time it is run.
The -\b-s\bs option is used for setting up the posting of mes-
sages. The line
msgs: "| /usr/ucb/msgs -s"
should be include in /_\bu_\bs_\br/_\bl_\bi_\bb/_\ba_\bl_\bi_\ba_\bs_\be_\bs to enable posting of
messages.
The -\b-c\bc option is used for performing cleanup on /_\bu_\bs_\br/_\bm_\bs_\bg_\bs.
An entry with the -\b-c\bc option should be placed in
/_\bu_\bs_\br/_\bl_\bi_\bb/_\bc_\br_\bo_\bn_\bt_\ba_\bb to run every night. This will remove all
messages over 21 days old. A different expiration may be
specified on the command line to override the default.
Options when reading messages include:
-\b-f\bf which causes it not to say ``No new messages.''.
This is useful in your ._\bl_\bo_\bg_\bi_\bn file since this is
often the case here.
-\b-q\bq Queries whether there are messages, printing ``There
are new messages.'' if there are. The command ``msgs
-q'' is often used in login scripts.
-\b-h\bh causes _\bm_\bs_\bg_\bs to print the first part of messages only.
-\b-l\bl option causes only locally originated messages to be
reported.
_\bn_\bu_\bm A message number can be given on the command line,
causing _\bm_\bs_\bg_\bs to start at the specified message rather
than at the next message indicated by your ._\bm_\bs_\bg_\bs_\br_\bc
file. Thus
msgs -h 1
prints the first part of all messages.
-_\bn_\bu_\bm_\bb_\be_\br
will cause _\bm_\bs_\bg_\bs to start _\bn_\bu_\bm_\bb_\be_\br messages back from
the one indicated by your ._\bm_\bs_\bg_\bs_\br_\bc file, useful for
reviews of recent messages.
-\b-p\bp causes long messages to be piped through _\bm_\bo_\br_\be(1).
Within _\bm_\bs_\bg_\bs you can also go to any specific message by typ-
ing its number when _\bm_\bs_\bg_\bs requests input as to what to do.
Printed 7/9/88 May 9, 1986 2
MSGS(1) UNIX Programmer's Manual MSGS(1)
F\bFI\bIL\bLE\bES\bS
/usr/msgs/* database
~/.msgsrc number of next message to be presented
A\bAU\bUT\bTH\bHO\bOR\bRS\bS
William Joy
David Wasley
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
aliases(5), crontab(5), mail(1), more(1)
B\bBU\bUG\bGS\bS
Printed 7/9/88 May 9, 1986 3