document -c and -s
[unix-history] / usr / src / usr.bin / msgs / msgs.1
CommitLineData
60c31fc3
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
86571e08 5.\" @(#)msgs.1 6.2 (Berkeley) %G%
60c31fc3 6.\"
2b266726 7.TH MSGS 1 ""
60c31fc3
KM
8.UC 4
9.SH NAME
10msgs \- system messages and junk mail program
11.SH SYNOPSIS
12.B msgs
13[
14.B \-fhlpq
15] [
16number
17] [
18\-number
19]
86571e08
JB
20.LP
21.B msgs
22.B \-s
23.LP
24.B msgs
25.B \-c
26[
27\-days
28]
60c31fc3
KM
29.SH DESCRIPTION
30.I Msgs
31is used to read system messages.
32These messages are
33sent by mailing to the login `msgs' and should be short
34pieces of information which are suitable to be read once by most users
35of the system.
36.PP
37.I Msgs
38is normally invoked each time you login, by placing it in the file
39.I \&.login
40.I (\&.profile
41if you use
42.IR /bin/sh ).
43It will then prompt you with the source and subject of each new message.
44If there is no subject line, the first few non-blank lines of the
45message will be displayed.
46If there is more to the message, you will be told how
47long it is and asked whether you wish to see the rest of the message.
48The possible responses are:
49.TP 7
50.B y
51type the rest of the message
52.TP 7
53RETURN
54synonym for y.
55.TP 7
56.B n
57skip this message
58and go on to the next message.
59.TP 7
60.B \-
61redisplay the last message.
62.TP 7
63.B q
64drops you out of
65.I msgs;
66the next time you run the program it will pick up where you left off.
67.TP 7
68.B s
69append the current message to the file ``Messages'' in the current directory;
70`s\-' will save the previously displayed message. A `s' or `s\-' may
86571e08 71be followed by a space and a file name to receive the message replacing
60c31fc3
KM
72the default ``Messages''.
73.TP 7
74.B m
75or `m\-' causes a copy of the specified message to be placed in a temporary
76mailbox and
77.IR mail (1)
78to be invoked on that mailbox.
79Both `m' and `s' accept a numeric argument in place of the `\-'.
80.PP
81.I Msgs
82keeps track of the next message you will see by a number in the file
83.I \&.msgsrc
84in your home directory.
85In the directory
86.I /usr/msgs
87it keeps a set of files whose names are the (sequential) numbers
88of the messages they represent.
89The file
90.I /usr/msgs/bounds
91shows the low and high number of the messages in the directory
92so that
93.I msgs
94can quickly determine if there are no messages for you.
95If the contents of
96.I bounds
97is incorrect it can be fixed by removing it;
98.I msgs
99will make a new
100.I bounds
101file the next time it is run.
102.PP
86571e08
JB
103The
104.B \-s
105option is used for setting up the posting of messages. The line
106.IP
107.DT
108msgs: "| /usr/ucb/msgs \-s"
109.PP
110should be include in
111.I /usr/lib/aliases
112to enable posting of messages.
113.PP
114The
115.B \-c
116option is used for performing cleanup on
117.I /usr/msgs.
118An entry with the
119.B \-c
120option should be placed in
121.I /usr/lib/crontab
122to run every night. This will remove all messages over 21 days old.
123A different expiration may be specified on the command line to override
124the default.
125.PP
126Options when reading messages include:
60c31fc3
KM
127.TP 7
128.B \-f
129which causes it not to say ``No new messages.''.
130This is useful in your
131.I \&.login
132file since this is often the case here.
133.TP 7
134.B \-q
135Queries whether there are messages, printing
136``There are new messages.'' if there are.
137The command ``msgs \-q'' is often used in login scripts.
138.TP 7
139.B \-h
140causes
141.I msgs
142to print the first part of messages only.
143.TP 7
144.B \-l
145option causes only locally originated messages to be reported.
146.TP 7
147\fInum\fR
148A message number can be given
149on the command line, causing
150.I msgs
151to start at the specified message rather than at the next message
152indicated by your
153.I \&.msgsrc
154file.
155Thus
156.IP "" 7
157 msgs \-h 1
158.IP "" 7
159prints the first part of all messages.
160.TP 7
161.I "\-number"
162will cause
163.I msgs
164to start
165.I number
166messages back from the one indicated by your
167.I \&.msgsrc
168file, useful for reviews of recent messages.
169.TP 7
170.B \-p
171causes long messages to be piped through
172.IR more (1).
173.PP
174Within
175.I msgs
176you can also go to any specific message by typing its number when
177.I msgs
178requests input as to what to do.
179.SH FILES
180.ta 2i
181/usr/msgs/* database
182.br
183~/.msgsrc number of next message to be presented
184.SH AUTHORS
185William Joy
186.br
187David Wasley
188.SH SEE ALSO
86571e08 189aliases(5), crontab(5), mail(1), more(1)
60c31fc3 190.SH BUGS