Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .\" Copyright (c) 1980, 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" @(#)msgs.1 6.9 (Berkeley) 7/30/91 | |
33 | .\" | |
34 | .Dd July 30, 1991 | |
35 | .Dt MSGS 1 | |
36 | .Os BSD 4 | |
37 | .Sh NAME | |
38 | .Nm msgs | |
39 | .Nd system messages and junk mail program | |
40 | .Sh SYNOPSIS | |
41 | .Nm msgs | |
42 | .Op Fl fhlpq | |
43 | .Op Ar number | |
44 | .Op Ar \-number | |
45 | .Nm msgs | |
46 | .Op Fl s | |
47 | .Nm msgs | |
48 | .Op Fl c | |
49 | .Op \-days | |
50 | .Sh DESCRIPTION | |
51 | .Nm Msgs | |
52 | is used to read system messages. | |
53 | These messages are | |
54 | sent by mailing to the login `msgs' and should be short | |
55 | pieces of information which are suitable to be read once by most users | |
56 | of the system. | |
57 | .Pp | |
58 | .Nm Msgs | |
59 | is normally invoked each time you login, by placing it in the file | |
60 | .Pa .login | |
61 | (or | |
62 | .Pa .profile | |
63 | if you use | |
64 | .Xr sh 1 ) . | |
65 | It will then prompt you with the source and subject of each new message. | |
66 | If there is no subject line, the first few non-blank lines of the | |
67 | message will be displayed. | |
68 | If there is more to the message, you will be told how | |
69 | long it is and asked whether you wish to see the rest of the message. | |
70 | The possible responses are: | |
71 | .Bl -tag -width Fl | |
78ed81a3 | 72 | .It Cm y |
15637ed4 RG |
73 | Type the rest of the message. |
74 | .It Ic RETURN | |
75 | Synonym for y. | |
78ed81a3 | 76 | .It Cm n |
15637ed4 RG |
77 | Skip this message |
78 | and go on to the next message. | |
79 | .It Fl | |
80 | Redisplay the last message. | |
78ed81a3 | 81 | .It Cm q |
15637ed4 RG |
82 | Drop out of |
83 | .Nm msgs ; | |
84 | the next time | |
85 | .Nm msgs | |
86 | will pick up where it last left off. | |
78ed81a3 | 87 | .It Cm s |
15637ed4 RG |
88 | Append the current message to the file ``Messages'' in the current directory; |
89 | `s\-' will save the previously displayed message. A `s' or `s\-' may | |
90 | be followed by a space and a file name to receive the message replacing | |
91 | the default ``Messages''. | |
78ed81a3 | 92 | .It Cm m |
15637ed4 RG |
93 | A copy of the specified message is placed in a temporary |
94 | mailbox and | |
95 | .Xr mail 1 | |
96 | is invoked on that mailbox. | |
97 | Both `m' and `s' accept a numeric argument in place of the `\-'. | |
98 | .El | |
99 | .Pp | |
100 | .Nm Msgs | |
101 | keeps track of the next message you will see by a number in the file | |
102 | .Pa \&.msgsrc | |
103 | in your home directory. | |
104 | In the directory | |
105 | .Pa /var/msgs | |
106 | it keeps a set of files whose names are the (sequential) numbers | |
107 | of the messages they represent. | |
108 | The file | |
109 | .Pa /var/msgs/bounds | |
110 | shows the low and high number of the messages in the directory | |
111 | so that | |
112 | .Nm msgs | |
113 | can quickly determine if there are no messages for you. | |
114 | If the contents of | |
115 | .Pa bounds | |
116 | is incorrect it can be fixed by removing it; | |
117 | .Nm msgs | |
118 | will make a new | |
119 | .Pa bounds | |
120 | file the next time it is run. | |
121 | .Pp | |
122 | The | |
123 | .Fl s | |
124 | option is used for setting up the posting of messages. The line | |
125 | .Pp | |
78ed81a3 | 126 | .Dl msgs: \&"\&| /usr/bin/msgs \-s\&" |
15637ed4 RG |
127 | .Pp |
128 | should be included in | |
129 | .Pa /etc/aliases | |
130 | (see | |
131 | .Xr newaliases 1 ) | |
132 | to enable posting of messages. | |
133 | .Pp | |
134 | The | |
135 | .Fl c | |
136 | option is used for performing cleanup on | |
137 | .Pa /var/msgs. | |
138 | An entry with the | |
139 | .Fl c | |
140 | option should be placed in | |
141 | .Pa /etc/crontab | |
142 | to run every night. This will remove all messages over 21 days old. | |
143 | A different expiration may be specified on the command line to override | |
144 | the default. | |
145 | .Pp | |
146 | Options when reading messages include: | |
147 | .Bl -tag -width Fl | |
148 | .It Fl f | |
149 | Do not to say ``No new messages.''. | |
150 | This is useful in a | |
151 | .Pa .login | |
152 | file since this is often the case here. | |
153 | .It Fl q | |
154 | Queries whether there are messages, printing | |
155 | ``There are new messages.'' if there are. | |
156 | The command ``msgs \-q'' is often used in login scripts. | |
157 | .It Fl h | |
158 | Print the first part of messages only. | |
159 | .It Fl l | |
160 | Option causes only locally originated messages to be reported. | |
161 | .It Ar num | |
162 | A message number can be given | |
163 | on the command line, causing | |
164 | .Nm msgs | |
165 | to start at the specified message rather than at the next message | |
166 | indicated by your | |
167 | .Pa \&.msgsrc | |
168 | file. | |
169 | Thus | |
170 | .Pp | |
171 | .Dl msgs \-h 1 | |
172 | .Pp | |
173 | prints the first part of all messages. | |
174 | .It Ar \-number | |
175 | Start | |
176 | .Ar number | |
177 | messages back from the one indicated in the | |
178 | .Pa \&.msgsrc | |
179 | file, useful for reviews of recent messages. | |
180 | .It Fl p | |
181 | Pipe long messages through | |
182 | .Xr more 1 . | |
183 | .El | |
184 | .Pp | |
185 | Within | |
186 | .Nm msgs | |
187 | you can also go to any specific message by typing its number when | |
188 | .Nm msgs | |
189 | requests input as to what to do. | |
190 | .Sh ENVIRONMENT | |
191 | .Nm Msgs | |
192 | uses the | |
193 | .Ev HOME | |
194 | and | |
195 | .Ev TERM | |
196 | environment variables for the default home directory and | |
197 | terminal type. | |
198 | .Sh FILES | |
78ed81a3 | 199 | .Bl -tag -width /var/msgs/* -compact |
200 | .It Pa /var/msgs/* | |
15637ed4 RG |
201 | database |
202 | .It ~/.msgsrc | |
203 | number of next message to be presented | |
204 | .El | |
205 | .Sh SEE ALSO | |
206 | .Xr aliases 5 , | |
207 | .\".Xr crontab 5 , | |
208 | .Xr mail 1 , | |
209 | .Xr more 1 | |
210 | .Sh HISTORY | |
211 | The | |
212 | .Nm msgs | |
213 | command appeared in | |
214 | .Bx 3.0 . |