BSD 4_3 release
[unix-history] / usr / man / man1 / msgs.1
index c6f702d..cfc4ba6 100644 (file)
@@ -1,25 +1,36 @@
-.TH MSGS 1 2/24/79
-.UC
+.\" Copyright (c) 1980 Regents of the University of California.
+.\" All rights reserved.  The Berkeley software License Agreement
+.\" specifies the terms and conditions for redistribution.
+.\"
+.\"    @(#)msgs.1      6.3 (Berkeley) 5/9/86
+.\"
+.TH MSGS 1 "May 9, 1986"
+.UC 4
 .SH NAME
 msgs \- system messages and junk mail program
 .SH SYNOPSIS
 .B msgs
 [
 .SH NAME
 msgs \- system messages and junk mail program
 .SH SYNOPSIS
 .B msgs
 [
-.B \-f
-] [
-.B \-q
-] [
-.B \-h
+.B \-fhlpq
 ] [
 number
 ] [
 \-number
 ]
 ] [
 number
 ] [
 \-number
 ]
+.LP
+.B msgs
+.B \-s
+.LP
+.B msgs
+.B \-c
+[
+\-days
+]
 .SH DESCRIPTION
 .I Msgs
 is used to read system messages.
 These messages are
 .SH DESCRIPTION
 .I Msgs
 is used to read system messages.
 These messages are
-sent by mailing to the login `msgs' and are short
+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
 pieces of information which are suitable to be read once by most users
 of the system.
 .PP
@@ -29,17 +40,46 @@ is normally invoked each time you login, by placing it in the file
 .I (\&.profile
 if you use
 .IR /bin/sh ).
 .I (\&.profile
 if you use
 .IR /bin/sh ).
-It will then prompt you with the first portion of each new message.
-If the message is longer than a couple of lines you will be told how
-long it is and asked whether you wish to see the whole message.
-You can type return, or `y' to see the message, or `n' to skip it
+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:
+.TP 7
+.B y
+type the rest of the message.
+.TP 7
+RETURN
+synonym for y.
+.TP 7
+.B n
+skip this message
 and go on to the next message.
 and go on to the next message.
-An interrupt drops you out of
+.TP 7
+.B \-
+redisplay the last message.
+.TP 7
+.B q
+drops you out of
 .I msgs;
 the next time you run the program it will pick up where you left off.
 .I msgs;
 the next time you run the program it will pick up where you left off.
+.TP 7
+.B s
+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''.
+.TP 7
+.B m
+or `m\-' causes a copy of the specified message to be placed in a temporary
+mailbox and 
+.IR mail (1)
+to be invoked on that mailbox.
+Both `m' and `s' accept a numeric argument in place of the `\-'.
 .PP
 .I Msgs
 .PP
 .I Msgs
-keeps track of the next message you will see by number in the file
+keeps track of the next message you will see by number in the file
 .I \&.msgsrc
 in your home directory.
 In the directory
 .I \&.msgsrc
 in your home directory.
 In the directory
@@ -52,7 +92,7 @@ shows the low and high number of the messages in the directory
 so that
 .I msgs
 can quickly determine if there are no messages for you.
 so that
 .I msgs
 can quickly determine if there are no messages for you.
-If this file
+If the contents of
 .I bounds
 is incorrect it can be fixed by removing it;
 .I msgs
 .I bounds
 is incorrect it can be fixed by removing it;
 .I msgs
@@ -60,53 +100,91 @@ will make a new
 .I bounds
 file the next time it is run.
 .PP
 .I bounds
 file the next time it is run.
 .PP
-Options to msgs include
+The
+.B \-s
+option is used for setting up the posting of messages.  The line
+.IP
+.DT
+msgs: "| /usr/ucb/msgs \-s"
+.PP
+should be include in
+.I /usr/lib/aliases
+to enable posting of messages.
+.PP
+The
+.B \-c
+option is used for performing cleanup on
+.I /usr/msgs.
+An entry with the
+.B \-c
+option should be placed in
+.I /usr/lib/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:
+.TP 7
 .B \-f
 .B \-f
-which causes it not to say ``No messages.''.
+which causes it not to say ``No new messages.''.
 This is useful in your
 .I \&.login
 file since this is often the case here.
 This is useful in your
 .I \&.login
 file since this is often the case here.
-If you prefer to learn of new messages without running the program
-you can put the command ``msgs \-q'' in your
-.I \&.login
-file.
-This queries whether there are messages, printing
+.TP 7
+.B \-q
+Queries whether there are messages, printing
 ``There are new messages.'' if there are.
 ``There are new messages.'' if there are.
-The
+The command ``msgs \-q'' is often used in login scripts.
+.TP 7
 .B \-h
 .B \-h
-option causes
+causes
 .I msgs
 to print the first part of messages only.
 .I msgs
 to print the first part of messages only.
-This is most useful when a message number is also given
+.TP 7
+.B \-l
+option causes only locally originated messages to be reported.
+.TP 7
+\fInum\fR
+A message number can be given
 on the command line, causing
 .I msgs
 to start at the specified message rather than at the next message
 on the command line, causing
 .I msgs
 to start at the specified message rather than at the next message
-your
+indicated by your
 .I \&.msgsrc
 .I \&.msgsrc
-file indicates.
+file.
 Thus
 Thus
-.IP
-msgs \-h 1
-.PP
+.IP "" 7
+    msgs \-h 1
+.IP "" 7
 prints the first part of all messages.
 prints the first part of all messages.
-The
+.TP 7
 .I "\-number"
 .I "\-number"
-option will start
+will cause
+.I msgs
+to start
 .I number
 .I number
-messages back from the one indicated in your 
+messages back from the one indicated by your 
 .I \&.msgsrc
 file, useful for reviews of recent messages.
 .I \&.msgsrc
 file, useful for reviews of recent messages.
+.TP 7
+.B \-p
+causes long messages to be piped through
+.IR more (1).
+.PP
 Within
 .I msgs
 you can also go to any specific message by typing its number when
 .I msgs
 requests input as to what to do.
 .SH FILES
 Within
 .I msgs
 you can also go to any specific message by typing its number when
 .I msgs
 requests input as to what to do.
 .SH FILES
-/usr/msgs/*            database
+.ta 2i
+/usr/msgs/*    database
 .br
 .br
-~/.msgsrc              number of next message to be presented
-.SH AUTHOR
+~/.msgsrc      number of next message to be presented
+.SH AUTHORS
 William Joy
 William Joy
+.br
+David Wasley
 .SH SEE ALSO
 .SH SEE ALSO
-mail(1)
+aliases(5), crontab(5), mail(1), more(1)
 .SH BUGS
 .SH BUGS