MSGS(1) | General Commands Manual | MSGS(1) |
msgs
—
msgs |
[-fhlpqr ] [number]
[-number] |
msgs |
[-s ] |
msgs |
[-c [-days]] |
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.
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
RETURN
n
-
q
msgs
; the next time
msgs
will pick up where it last left off.s
m
p
PAGER
, or,
if PAGER
is null or not defined,
more(1). 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. If the contents of bounds is incorrect it
can be fixed by removing it; msgs
will make a new
bounds file the next time it is run.
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(1)) to enable posting of messages.
The -c
option is used for performing
cleanup on /var/msgs. An entry with the
-c
option should be placed in
/etc/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. This number must be negative and
indicates the number of days before the present whose messages should be
kept; that is, use -c
-3 to
remove messages more than three days old.
Options when reading messages include:
-f
-q
-h
-r
PAGER
is set to something secure.-l
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.
-p
PAGER
, or, if
PAGER
is null or not defined,
more(1).Within msgs
you can also go to any
specific message by typing its number when msgs
requests input as to what to do.
msgs
uses the HOME
and
TERM
environment variables for the default home
directory and terminal type.
msgs
command appeared in
3.0BSD.
April 28, 1995 | NetBSD 9.4 |