2001-12-01 23:44:29 +03:00
|
|
|
.\" $NetBSD: msgs.1,v 1.12 2001/12/01 20:44:29 wiz Exp $
|
1995-09-28 09:57:37 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1980, 1990, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1995-09-28 09:57:37 +03:00
|
|
|
.\" @(#)msgs.1 8.2 (Berkeley) 4/28/95
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
1995-09-28 09:57:37 +03:00
|
|
|
.Dd April 28, 1995
|
1993-03-21 12:45:37 +03:00
|
|
|
.Dt MSGS 1
|
1999-03-22 21:16:34 +03:00
|
|
|
.Os
|
1993-03-21 12:45:37 +03:00
|
|
|
.Sh NAME
|
|
|
|
.Nm msgs
|
|
|
|
.Nd system messages and junk mail program
|
|
|
|
.Sh SYNOPSIS
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1994-01-07 19:22:15 +03:00
|
|
|
.Op Fl fhlpqr
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Ar number
|
|
|
|
.Op Ar \-number
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm ""
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Fl s
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm ""
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Fl c
|
|
|
|
.Op \-days
|
|
|
|
.Sh DESCRIPTION
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
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.
|
|
|
|
.Pp
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
is normally invoked each time you login, by placing it in the file
|
|
|
|
.Pa .login
|
|
|
|
(or
|
|
|
|
.Pa .profile
|
|
|
|
if you use
|
|
|
|
.Xr sh 1 ) .
|
|
|
|
It will then prompt you with the source and subject of each new message.
|
|
|
|
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 possible responses are:
|
1999-08-29 21:50:09 +04:00
|
|
|
.Bl -tag -width Ic
|
|
|
|
.It Ic y
|
1993-03-21 12:45:37 +03:00
|
|
|
Type the rest of the message.
|
|
|
|
.It Ic RETURN
|
|
|
|
Synonym for y.
|
1999-08-29 21:50:09 +04:00
|
|
|
.It Ic n
|
1993-03-21 12:45:37 +03:00
|
|
|
Skip this message
|
|
|
|
and go on to the next message.
|
1999-08-29 21:50:09 +04:00
|
|
|
.It Ic -
|
1993-03-21 12:45:37 +03:00
|
|
|
Redisplay the last message.
|
1999-08-29 21:50:09 +04:00
|
|
|
.It Ic q
|
1993-03-21 12:45:37 +03:00
|
|
|
Drop out of
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm "" ;
|
1993-03-21 12:45:37 +03:00
|
|
|
the next time
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
will pick up where it last left off.
|
1999-08-29 21:50:09 +04:00
|
|
|
.It Ic s
|
1993-03-21 12:45:37 +03:00
|
|
|
Append the current message to the file ``Messages'' in the current directory;
|
|
|
|
`s\-' will save the previously displayed message. A `s' or `s\-' may
|
|
|
|
be followed by a space and a file name to receive the message replacing
|
|
|
|
the default ``Messages''.
|
1999-08-29 21:50:09 +04:00
|
|
|
.It Ic m
|
1993-03-21 12:45:37 +03:00
|
|
|
A copy of the specified message is placed in a temporary
|
|
|
|
mailbox and
|
|
|
|
.Xr mail 1
|
|
|
|
is invoked on that mailbox.
|
1999-08-29 21:50:09 +04:00
|
|
|
.It Ic p
|
1999-06-13 23:38:04 +04:00
|
|
|
The specified message is piped through
|
|
|
|
.Ev PAGER ,
|
|
|
|
or, if
|
|
|
|
.Ev PAGER
|
|
|
|
is null or not defined,
|
1995-09-28 09:57:37 +03:00
|
|
|
.Xr more 1 .
|
1994-01-07 19:22:15 +03:00
|
|
|
The commands `m', `p', and `s' all accept a numeric argument in place of the `\-'.
|
1995-09-28 09:57:37 +03:00
|
|
|
.El
|
1994-01-07 19:22:15 +03:00
|
|
|
.Pp
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
keeps track of the next message you will see by a number in the file
|
|
|
|
.Pa \&.msgsrc
|
|
|
|
in your home directory.
|
|
|
|
In the directory
|
|
|
|
.Pa /var/msgs
|
|
|
|
it keeps a set of files whose names are the (sequential) numbers
|
|
|
|
of the messages they represent.
|
|
|
|
The file
|
|
|
|
.Pa /var/msgs/bounds
|
|
|
|
shows the low and high number of the messages in the directory
|
|
|
|
so that
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
can quickly determine if there are no messages for you.
|
|
|
|
If the contents of
|
|
|
|
.Pa bounds
|
|
|
|
is incorrect it can be fixed by removing it;
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
will make a new
|
|
|
|
.Pa bounds
|
|
|
|
file the next time it is run.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Fl s
|
|
|
|
option is used for setting up the posting of messages. The line
|
|
|
|
.Pp
|
1993-08-18 00:02:27 +04:00
|
|
|
.Dl msgs: \&"\&| /usr/bin/msgs \-s\&"
|
1993-03-21 12:45:37 +03:00
|
|
|
.Pp
|
|
|
|
should be included in
|
2000-05-05 22:21:06 +04:00
|
|
|
.Pa /etc/mail/aliases
|
1993-03-21 12:45:37 +03:00
|
|
|
(see
|
|
|
|
.Xr newaliases 1 )
|
|
|
|
to enable posting of messages.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Fl c
|
|
|
|
option is used for performing cleanup on
|
2001-12-01 23:44:29 +03:00
|
|
|
.Pa /var/msgs .
|
1993-03-21 12:45:37 +03:00
|
|
|
An entry with the
|
|
|
|
.Fl c
|
|
|
|
option should be placed in
|
|
|
|
.Pa /etc/crontab
|
|
|
|
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.
|
|
|
|
.Pp
|
|
|
|
Options when reading messages include:
|
|
|
|
.Bl -tag -width Fl
|
|
|
|
.It Fl f
|
|
|
|
Do not to say ``No new messages.''.
|
|
|
|
This is useful in a
|
|
|
|
.Pa .login
|
|
|
|
file since this is often the case here.
|
|
|
|
.It Fl q
|
|
|
|
Queries whether there are messages, printing
|
|
|
|
``There are new messages.'' if there are.
|
|
|
|
The command ``msgs \-q'' is often used in login scripts.
|
|
|
|
.It Fl h
|
|
|
|
Print the first part of messages only.
|
1994-01-07 19:22:15 +03:00
|
|
|
.It Fl r
|
|
|
|
Disables the ability to save messages or enter the mailer. It is
|
1999-06-13 23:38:04 +04:00
|
|
|
assumed that
|
|
|
|
.Ev PAGER
|
|
|
|
is set to something secure.
|
1993-03-21 12:45:37 +03:00
|
|
|
.It Fl l
|
|
|
|
Option causes only locally originated messages to be reported.
|
|
|
|
.It Ar num
|
|
|
|
A message number can be given
|
|
|
|
on the command line, causing
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
to start at the specified message rather than at the next message
|
|
|
|
indicated by your
|
|
|
|
.Pa \&.msgsrc
|
|
|
|
file.
|
|
|
|
Thus
|
|
|
|
.Pp
|
|
|
|
.Dl msgs \-h 1
|
|
|
|
.Pp
|
|
|
|
prints the first part of all messages.
|
|
|
|
.It Ar \-number
|
|
|
|
Start
|
|
|
|
.Ar number
|
|
|
|
messages back from the one indicated in the
|
|
|
|
.Pa \&.msgsrc
|
|
|
|
file, useful for reviews of recent messages.
|
|
|
|
.It Fl p
|
1999-06-13 23:38:04 +04:00
|
|
|
Pipe long messages through
|
|
|
|
.Ev PAGER ,
|
|
|
|
or, if
|
|
|
|
.Ev PAGER
|
|
|
|
is null or not defined,
|
1993-03-21 12:45:37 +03:00
|
|
|
.Xr more 1 .
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Within
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
you can also go to any specific message by typing its number when
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
requests input as to what to do.
|
|
|
|
.Sh ENVIRONMENT
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
uses the
|
|
|
|
.Ev HOME
|
|
|
|
and
|
|
|
|
.Ev TERM
|
|
|
|
environment variables for the default home directory and
|
|
|
|
terminal type.
|
|
|
|
.Sh FILES
|
1998-11-20 06:18:25 +03:00
|
|
|
.Bl -tag -width /var/msgs/* -compact
|
|
|
|
.It Pa /var/msgs/*
|
1993-03-21 12:45:37 +03:00
|
|
|
database
|
|
|
|
.It ~/.msgsrc
|
|
|
|
number of next message to be presented
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mail 1 ,
|
2001-12-01 23:44:29 +03:00
|
|
|
.Xr more 1 ,
|
|
|
|
.Xr aliases 5
|
|
|
|
.\".Xr crontab 5
|
1993-03-21 12:45:37 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
1997-10-14 05:28:47 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
command appeared in
|
|
|
|
.Bx 3.0 .
|