]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/msgs/msgs.1
This commit was generated by cvs2svn to compensate for changes in r62076,
[FreeBSD/FreeBSD.git] / usr.bin / msgs / msgs.1
1 .\" Copyright (c) 1980, 1990, 1993
2 .\"     The Regents of the University of California.  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      8.2 (Berkeley) 4/28/95
33 .\" $FreeBSD$
34 .\"
35 .Dd April 28, 1995
36 .Dt MSGS 1
37 .Os BSD 4
38 .Sh NAME
39 .Nm msgs
40 .Nd system messages and junk mail program
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl fhlpq
44 .Op Ar number
45 .Op Ar \-number
46 .Nm msgs
47 .Op Fl s
48 .Nm msgs
49 .Op Fl c
50 .Op \-days
51 .Sh DESCRIPTION
52 .Nm Msgs
53 is used to read system messages.
54 These messages are
55 sent by mailing to the login `msgs' and should be short
56 pieces of information which are suitable to be read once by most users
57 of the system.
58 .Pp
59 .Nm Msgs
60 is normally invoked each time you login, by placing it in the file
61 .Pa .login
62 (or
63 .Pa .profile
64 if you use
65 .Xr sh 1 ) .
66 It will then prompt you with the source and subject of each new message.
67 If there is no subject line, the first few non-blank lines of the
68 message will be displayed.
69 If there is more to the message, you will be told how
70 long it is and asked whether you wish to see the rest of the message.
71 The possible responses are:
72 .Bl -tag -width Fl
73 .It Fl y
74 Type the rest of the message.
75 .It Ic RETURN
76 Synonym for y.
77 .It Fl n
78 Skip this message
79 and go on to the next message.
80 .It Fl
81 Redisplay the last message.
82 .It Fl q
83 Drop out of
84 .Nm msgs ;
85 the next time
86 .Nm
87 will pick up where it last left off.
88 .It Fl s
89 Append the current message to the file ``Messages'' in the current directory;
90 `s\-' will save the previously displayed message.
91 A `s' or `s\-' may
92 be followed by a space and a file name to receive the message replacing
93 the default ``Messages''.
94 .It Fl m
95 A copy of the specified message is placed in a temporary
96 mailbox and
97 .Xr mail  1
98 is invoked on that mailbox.
99 Both `m' and `s' accept a numeric argument in place of the `\-'.
100 .El
101 .Pp
102 .Nm Msgs
103 keeps track of the next message you will see by a number in the file
104 .Pa \&.msgsrc
105 in your home directory.
106 In the directory
107 .Pa /var/msgs
108 it keeps a set of files whose names are the (sequential) numbers
109 of the messages they represent.
110 The file
111 .Pa /var/msgs/bounds
112 shows the low and high number of the messages in the directory
113 so that
114 .Nm
115 can quickly determine if there are no messages for you.
116 If the contents of
117 .Pa bounds
118 is incorrect it can be fixed by removing it;
119 .Nm
120 will make a new
121 .Pa bounds
122 file the next time it is run with the
123 .Fl s
124 option.
125 If
126 .Nm
127 is run with any option other than
128 .Fl s ,
129 an error will be displayed if
130 .Pa /var/msgs/bounds
131 does not exist.
132 .Pp
133 The
134 .Fl s
135 option is used for setting up the posting of messages.  The line
136 .Pp
137 .Dl msgs: \&"\&| /usr/bin/msgs \-s\&"
138 .Pp
139 should be included in
140 .Pa /etc/aliases
141 (see
142 .Xr newaliases 1 )
143 to enable posting of messages.
144 .Pp
145 The
146 .Fl c
147 option is used for performing cleanup on
148 .Pa /var/msgs .
149 A shell script entry to run
150 .Nm
151 with the
152 .Fl c
153 option should be placed in
154 .Pa /etc/periodic/daily
155 (see 
156 .Xr periodic 8 )
157 to run every night.  This will remove all messages over 21 days old.
158 A different expiration may be specified on the command line to override
159 the default.
160 .Pp
161 Options when reading messages include:
162 .Bl -tag -width Fl
163 .It Fl f
164 Do not say ``No new messages.''.
165 This is useful in a
166 .Pa .login
167 file since this is often the case here.
168 .It Fl q
169 Queries whether there are messages, printing
170 ``There are new messages.'' if there are.
171 The command ``msgs \-q'' is often used in login scripts.
172 .It Fl h
173 Print the first part of messages only.
174 .It Fl l
175 Option causes only locally originated messages to be reported.
176 .It Ar num
177 A message number can be given
178 on the command line, causing
179 .Nm
180 to start at the specified message rather than at the next message
181 indicated by your
182 .Pa \&.msgsrc
183 file.
184 Thus
185 .Pp
186 .Dl msgs \-h 1
187 .Pp
188 prints the first part of all messages.
189 .It Ar \-number
190 Start
191 .Ar number
192 messages back from the one indicated in the
193 .Pa \&.msgsrc
194 file, useful for reviews of recent messages.
195 .It Fl p
196 Pipe long messages through
197 .Xr more  1  .
198 .El
199 .Pp
200 Within
201 .Nm
202 you can also go to any specific message by typing its number when
203 .Nm
204 requests input as to what to do.
205 .Sh ENVIRONMENT
206 .Nm Msgs
207 uses the
208 .Ev HOME
209 and
210 .Ev TERM
211 environment variables for the default home directory and
212 terminal type.
213 .Sh FILES
214 .Bl -tag -width /var/msgs/* -compact
215 .It Pa /var/msgs/*
216 database
217 .It ~/.msgsrc
218 number of next message to be presented
219 .El
220 .Sh SEE ALSO
221 .Xr mail 1 ,
222 .Xr more 1 ,
223 .Xr aliases 5 ,
224 .Xr periodic 8
225 .Sh HISTORY
226 The
227 .Nm
228 command appeared in
229 .Bx 3.0 .