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

1.8     ! aaron       1: .\"    $OpenBSD: msgs.1,v 1.7 1999/06/10 22:38:03 pjanzen 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
1.6       aaron      39: .Os
1.1       deraadt    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
1.8     ! aaron      57: sent by mailing to the login
        !            58: .Dq msgs
        !            59: and should be short
1.1       deraadt    60: pieces of information which are suitable to be read once by most users
                     61: of the system.
                     62: .Pp
1.8     ! aaron      63: The options are as follows:
1.5       aaron      64: .Bl -tag -width Fl
                     65: .It Fl f
1.8     ! aaron      66: Do not say
        !            67: .Dq \&No new messages.
1.5       aaron      68: This is useful in a
                     69: .Pa .login
                     70: file since this is often the case here.
                     71: .It Fl q
                     72: Queries whether there are messages, printing
1.8     ! aaron      73: .Dq There are new messages.
        !            74: if there are.
        !            75: The command
        !            76: .Ic msgs \-q
        !            77: is often used in login scripts.
1.5       aaron      78: .It Fl h
                     79: Print the first part of messages only.
                     80: .It Fl r
                     81: Disables the ability to save messages or enter the mailer.  It is
                     82: assumed that the
                     83: .Ev PAGER
                     84: environment is set to something secure.
                     85: .It Fl l
                     86: Causes only locally originated messages to be reported.
                     87: .It Ar num
                     88: A message number can be given
                     89: on the command line, causing
                     90: .Nm msgs
                     91: to start at the specified message rather than at the next message
                     92: indicated by your
                     93: .Pa \&.msgsrc
                     94: file.
                     95: Thus
                     96: .Pp
                     97: .Dl msgs \-h 1
                     98: .Pp
                     99: prints the first part of all messages.
                    100: .It Ar \-number
                    101: Start
                    102: .Ar number
                    103: messages back from the one indicated in the
                    104: .Pa \&.msgsrc
                    105: file, useful for reviews of recent messages.
                    106: .It Fl p
                    107: Pipe long messages through the program specified by the
                    108: .Ev PAGER
                    109: environment variable. If
                    110: .Ev PAGER
1.7       pjanzen   111: is null or not defined,
1.5       aaron     112: .Xr more 1
                    113: is used.
                    114: .El
                    115: .Pp
1.3       aaron     116: .Nm msgs
1.1       deraadt   117: is normally invoked each time you login, by placing it in the file
                    118: .Pa .login
                    119: (or
                    120: .Pa .profile
                    121: if you use
                    122: .Xr sh 1 ) .
                    123: It will then prompt you with the source and subject of each new message.
                    124: If there is no subject line, the first few non-blank lines of the
                    125: message will be displayed.
                    126: If there is more to the message, you will be told how
                    127: long it is and asked whether you wish to see the rest of the message.
                    128: The possible responses are:
                    129: .Bl -tag -width Fl
1.3       aaron     130: .It Ic y
1.1       deraadt   131: Type the rest of the message.
                    132: .It Ic RETURN
1.3       aaron     133: Synonym for
                    134: .Ic y .
                    135: .It Ic n
1.1       deraadt   136: Skip this message
                    137: and go on to the next message.
1.3       aaron     138: .It Ic \&-
1.1       deraadt   139: Redisplay the last message.
1.3       aaron     140: .It Ic q
1.1       deraadt   141: Drop out of
                    142: .Nm msgs ;
                    143: the next time
                    144: .Nm msgs
                    145: will pick up where it last left off.
1.3       aaron     146: .It Ic s
1.8     ! aaron     147: Append the current message to the file
        !           148: .Pa Messages
        !           149: in the current directory;
1.1       deraadt   150: `s\-' will save the previously displayed message. A `s' or `s\-' may
                    151: be followed by a space and a file name to receive the message replacing
                    152: the default ``Messages''.
1.3       aaron     153: .It Ic m
1.1       deraadt   154: A copy of the specified message is placed in a temporary
                    155: mailbox and
1.8     ! aaron     156: .Xr mail 1
1.1       deraadt   157: is invoked on that mailbox.
1.3       aaron     158: .It Ic p
1.5       aaron     159: The specified message is piped through the program specified by the
                    160: .Ev PAGER
                    161: environment variable. If
                    162: .Ev PAGER
                    163: is not defined,
                    164: .Xr more 1
                    165: is used.
1.1       deraadt   166: .El
                    167: .Pp
1.5       aaron     168: The commands `m', `p', and `s' all accept a numeric argument in place of the
                    169: .Sq \&- .
                    170: .Pp
1.3       aaron     171: .Nm msgs
1.1       deraadt   172: keeps track of the next message you will see by a number in the file
                    173: .Pa \&.msgsrc
                    174: in your home directory.
                    175: In the directory
                    176: .Pa /var/msgs
                    177: it keeps a set of files whose names are the (sequential) numbers
                    178: of the messages they represent.
                    179: The file
                    180: .Pa /var/msgs/bounds
                    181: shows the low and high number of the messages in the directory
                    182: so that
                    183: .Nm msgs
                    184: can quickly determine if there are no messages for you.
                    185: If the contents of
                    186: .Pa bounds
                    187: is incorrect it can be fixed by removing it;
                    188: .Nm msgs
                    189: will make a new
                    190: .Pa bounds
                    191: file the next time it is run.
                    192: .Pp
                    193: The
                    194: .Fl s
                    195: option is used for setting up the posting of messages.  The line
                    196: .Pp
                    197: .Dl msgs: \&"\&| /usr/bin/msgs \-s\&"
                    198: .Pp
                    199: should be included in
                    200: .Pa /etc/aliases
                    201: (see
                    202: .Xr newaliases 1 )
                    203: to enable posting of messages.
                    204: .Pp
                    205: The
                    206: .Fl c
                    207: option is used for performing cleanup on
1.3       aaron     208: .Pa /var/msgs .
1.1       deraadt   209: An entry with the
                    210: .Fl c
                    211: option should be placed in
                    212: .Pa /etc/crontab
                    213: to run every night.  This will remove all messages over 21 days old.
                    214: A different expiration may be specified on the command line to override
                    215: the default.
                    216: .Pp
                    217: Within
                    218: .Nm msgs
                    219: you can also go to any specific message by typing its number when
                    220: .Nm msgs
                    221: requests input as to what to do.
                    222: .Sh ENVIRONMENT
1.3       aaron     223: .Nm msgs
1.1       deraadt   224: uses the
                    225: .Ev HOME
                    226: and
                    227: .Ev TERM
                    228: environment variables for the default home directory and
1.7       pjanzen   229: terminal type. If defined and non-null, the
1.5       aaron     230: .Ev PAGER
                    231: variable is invoked as the pagination program.
1.1       deraadt   232: .Sh FILES
1.4       deraadt   233: .Bl -tag -width /var/msgs/* -compact
                    234: .It Pa /var/msgs/*
1.1       deraadt   235: database
                    236: .It ~/.msgsrc
                    237: number of next message to be presented
                    238: .El
                    239: .Sh SEE ALSO
                    240: .Xr mail 1 ,
1.3       aaron     241: .Xr more 1 ,
1.5       aaron     242: .Xr newaliases 1 ,
1.3       aaron     243: .Xr aliases 5
1.5       aaron     244: .\".Xr crontab 5 ,
1.1       deraadt   245: .Sh HISTORY
                    246: The
                    247: .Nm msgs
                    248: command appeared in
                    249: .Bx 3.0 .