*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> msgs (1)              
Title
Content
Arch
Section
 

MSGS(1)

Contents


NAME    [Toc]    [Back]

     msgs - system messages and junk mail program

SYNOPSIS    [Toc]    [Back]

     msgs [-fhlopqr] [[-]number]
     msgs [-s]
     msgs [-c [-days]]

DESCRIPTION    [Toc]    [Back]

     msgs is used to read system messages.   These  messages  are
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.

     The options are as follows:

     -c -days
              The -c option is used  for  performing  cleanup  on
/var/msgs.  An
              entry  with  the  -c option should be placed in the
system
              crontab(5) to run every night.   This  will  remove
all messages
              over  21 days old.  The optional -days argument may
be specified
              on the command line to override the default.

     -f       Do not say ``No new messages.'' This is useful in a
.login file
              since this is often the case here.

     -h       Print the first part of messages only.

     -l        Causes  only locally originated messages to be reported.

     -o       By default, msgs exits when there are no more  messages to read.
              If the -o flag is specified, the user will be given
the chance
              to save or read messages again.

     -p       Pipe long messages through the program specified by
the PAGER
              environment  variable.  If PAGER is null or not defined, more(1)
              is used.

     -q        Queries  whether  there  are  messages,   printing
``There are new
              messages.''  if  there are.  The command msgs -q is
often used in
              login scripts.

     -r       Disables the ability to save messages or enter  the
mailer.  It
              is  assumed  that  the  PAGER environment is set to
something secure.


     -s       The -s option is used for setting up the posting of
messages.
              The line

                    msgs: "| /usr/bin/msgs -s"

              should   be   included  in  /etc/mail/aliases  (see
newaliases(8)) to
              enable posting of messages.

     number   A message number can be given on the command  line,
causing msgs
              to  start  at  the specified message rather than at
the next message
 indicated by your .msgsrc file.  Thus

                    msgs -h 1

              prints the first part of all messages.

     -number  Start number messages back from the  one  indicated
in the .msgsrc
              file; useful for reviews of recent messages.

     msgs  is normally invoked each time you login, by placing it
in the file
     .login (or .profile if you use sh(1)).  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:

     y           Type the rest of the message.

     RETURN      Synonym for y.

     n           Skip this message and go on to the next message.

     -           Redisplay the last message.

     q           Drop out of msgs; the next time msgs  will  pick
up where it
                 last left off.

     s            Append the current message to the file Messages
in the current
 directory; `s-' will  save  the  previously
displayed message.
  An `s' or `s-' may be followed by a space
and a file
                 name to receive the message  replacing  the  default
                 ``Messages''.

     m            A  copy of the specified message is placed in a
temporary
                 mailbox and mail(1) is invoked on that  mailbox.

     p            The specified message is piped through the program specified
                 by the PAGER environment variable.  If PAGER  is
not defined,
                 more(1) is used.

     The  commands  m,  p, and s all accept a numeric argument in
place of the
     `-'.

     msgs keeps track of the next message you will see by a  number in the file
     .msgsrc  in your home directory.  In the directory /var/msgs
it keeps a
     set of files whose names are the (sequential) numbers of the
messages
     they represent.  The file /var/msgs/bounds shows the low and
high number
     of the messages in the directory so that  msgs  can  quickly
determine if
     there are no messages for you.

     Within  msgs you can also go to any specific message by typing its number
     when msgs requests input as to what to do.

ENVIRONMENT    [Toc]    [Back]

     msgs uses the HOME and TERM environment  variables  for  the
default home
     directory  and  terminal type.  If defined and non-null, the
PAGER variable
     is invoked as the pagination program.

FILES    [Toc]    [Back]

     /var/msgs/*  database
     ~/.msgsrc    number of next message to be presented

SEE ALSO    [Toc]    [Back]

      
      
     mail(1), more(1), aliases(5), crontab(5), newaliases(8)

HISTORY    [Toc]    [Back]

     The msgs command appeared in 3.0BSD.

OpenBSD     3.6                          April      28,      1995
[ Back ]
 Similar pages
Name OS Title
from Tru64 Shows whom mail messages are from
fmt Tru64 Formats mail messages prior to sending
mqueue Tru64 Contains the log file and temporary files associated with the messages in the mail queue
writesrv Tru64 Lets users send messages to and receive messages from a remote system
snmp_traprcv Tru64 A program that listens for SNMP trap messages and prints any it receives
msgtql HP-UX maximum number of System V IPC messages in the system at any time
mh Tru64 Introduction to the MH system for handling mail
praliases Tru64 display system mail aliases
mailsetup Tru64 Configures the host's mail system
praliases FreeBSD display system mail aliases
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service