[BACK]Return to msgs.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / msgs

Annotation of src/usr.bin/msgs/msgs.1, Revision 1.1.1.1

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