[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.5

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