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

1.13    ! deraadt     1: .\"    $OpenBSD: msgs.1,v 1.12 2000/11/09 17:52:26 aaron 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
1.13    ! deraadt    51: .Op Fl c Op Ar days
1.1       deraadt    52: .Sh DESCRIPTION
1.3       aaron      53: .Nm msgs
1.1       deraadt    54: is used to read system messages.
                     55: These messages are
1.8       aaron      56: sent by mailing to the login
                     57: .Dq msgs
                     58: and should be short
1.1       deraadt    59: pieces of information which are suitable to be read once by most users
                     60: of the system.
                     61: .Pp
1.8       aaron      62: The options are as follows:
1.12      aaron      63: .Bl -tag -width Ds
1.5       aaron      64: .It Fl f
1.8       aaron      65: Do not say
                     66: .Dq \&No new messages.
1.5       aaron      67: This is useful in a
                     68: .Pa .login
                     69: file since this is often the case here.
                     70: .It Fl q
                     71: Queries whether there are messages, printing
1.8       aaron      72: .Dq There are new messages.
                     73: if there are.
                     74: The command
                     75: .Ic msgs \-q
                     76: is often used in login scripts.
1.5       aaron      77: .It Fl h
                     78: Print the first part of messages only.
                     79: .It Fl r
1.9       aaron      80: Disables the ability to save messages or enter the mailer.
                     81: It is assumed that the
1.5       aaron      82: .Ev PAGER
                     83: environment is set to something secure.
                     84: .It Fl l
                     85: Causes only locally originated messages to be reported.
1.13    ! deraadt    86: .It Ar number
1.5       aaron      87: A message number can be given
                     88: on the command line, causing
                     89: .Nm msgs
                     90: to start at the specified message rather than at the next message
                     91: indicated by your
                     92: .Pa \&.msgsrc
                     93: file.
                     94: Thus
                     95: .Pp
                     96: .Dl msgs \-h 1
                     97: .Pp
                     98: prints the first part of all messages.
                     99: .It Ar \-number
                    100: Start
                    101: .Ar number
                    102: messages back from the one indicated in the
                    103: .Pa \&.msgsrc
                    104: file, useful for reviews of recent messages.
                    105: .It Fl p
                    106: Pipe long messages through the program specified by the
                    107: .Ev PAGER
1.9       aaron     108: environment variable.
                    109: If
1.5       aaron     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.9       aaron     150: .Sq s\-
                    151: will save the previously displayed message.
                    152: An
                    153: .Sq s
                    154: or
                    155: .Sq s\-
                    156: may be followed by a space and a file name to receive the message replacing
                    157: the default
                    158: .Dq Messages .
1.3       aaron     159: .It Ic m
1.1       deraadt   160: A copy of the specified message is placed in a temporary
                    161: mailbox and
1.8       aaron     162: .Xr mail 1
1.1       deraadt   163: is invoked on that mailbox.
1.3       aaron     164: .It Ic p
1.5       aaron     165: The specified message is piped through the program specified by the
                    166: .Ev PAGER
1.9       aaron     167: environment variable.
                    168: If
1.5       aaron     169: .Ev PAGER
                    170: is not defined,
                    171: .Xr more 1
                    172: is used.
1.1       deraadt   173: .El
                    174: .Pp
1.9       aaron     175: The commands
                    176: .Ic m ,
                    177: .Ic p ,
                    178: and
                    179: .Ic s
                    180: all accept a numeric argument in place of the
1.5       aaron     181: .Sq \&- .
                    182: .Pp
1.3       aaron     183: .Nm msgs
1.1       deraadt   184: keeps track of the next message you will see by a number in the file
                    185: .Pa \&.msgsrc
                    186: in your home directory.
                    187: In the directory
                    188: .Pa /var/msgs
                    189: it keeps a set of files whose names are the (sequential) numbers
                    190: of the messages they represent.
                    191: The file
                    192: .Pa /var/msgs/bounds
                    193: shows the low and high number of the messages in the directory
                    194: so that
                    195: .Nm msgs
                    196: can quickly determine if there are no messages for you.
                    197: If the contents of
                    198: .Pa bounds
                    199: is incorrect it can be fixed by removing it;
                    200: .Nm msgs
                    201: will make a new
                    202: .Pa bounds
                    203: file the next time it is run.
                    204: .Pp
                    205: The
                    206: .Fl s
1.9       aaron     207: option is used for setting up the posting of messages.
                    208: The line
1.1       deraadt   209: .Pp
                    210: .Dl msgs: \&"\&| /usr/bin/msgs \-s\&"
                    211: .Pp
                    212: should be included in
1.10      deraadt   213: .Pa /etc/mail/aliases
1.1       deraadt   214: (see
1.11      millert   215: .Xr newaliases 8 )
1.1       deraadt   216: to enable posting of messages.
                    217: .Pp
                    218: The
                    219: .Fl c
                    220: option is used for performing cleanup on
1.3       aaron     221: .Pa /var/msgs .
1.1       deraadt   222: An entry with the
                    223: .Fl c
                    224: option should be placed in
                    225: .Pa /etc/crontab
1.9       aaron     226: to run every night.
                    227: This will remove all messages over 21 days old.
1.1       deraadt   228: A different expiration may be specified on the command line to override
                    229: the default.
                    230: .Pp
                    231: Within
                    232: .Nm msgs
                    233: you can also go to any specific message by typing its number when
                    234: .Nm msgs
                    235: requests input as to what to do.
                    236: .Sh ENVIRONMENT
1.3       aaron     237: .Nm msgs
1.1       deraadt   238: uses the
                    239: .Ev HOME
                    240: and
                    241: .Ev TERM
                    242: environment variables for the default home directory and
1.9       aaron     243: terminal type.
                    244: If defined and non-null, the
1.5       aaron     245: .Ev PAGER
                    246: variable is invoked as the pagination program.
1.1       deraadt   247: .Sh FILES
1.4       deraadt   248: .Bl -tag -width /var/msgs/* -compact
                    249: .It Pa /var/msgs/*
1.1       deraadt   250: database
                    251: .It ~/.msgsrc
                    252: number of next message to be presented
                    253: .El
                    254: .Sh SEE ALSO
                    255: .Xr mail 1 ,
1.3       aaron     256: .Xr more 1 ,
1.11      millert   257: .Xr aliases 5 ,
1.5       aaron     258: .\".Xr crontab 5 ,
1.11      millert   259: .Xr newaliases 8
1.1       deraadt   260: .Sh HISTORY
                    261: The
                    262: .Nm msgs
                    263: command appeared in
                    264: .Bx 3.0 .