Main index | Section 1 | 日本語 | Options |
The msgs utility 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:
| |
Type the rest of the message. | |
RETURN | |
Synonym for y. | |
| |
Skip this message and go on to the next message. | |
- | Redisplay the last message. |
| |
Drop out of msgs; the next time msgs will pick up where it last left off. | |
| |
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''. | |
| |
A copy of the specified message is placed in a temporary mailbox and mail(1) is invoked on that mailbox. Both `m' and `s' accept a numeric argument in place of the `-'. | |
The
msgs
utility keeps track of the next message you will see by a number in the file
amp;.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 with the
The
msgs: amp;"amp;| /usr/bin/msgs -samp;"
should be included in /etc/mail/aliases (see newaliases(1)) to enable posting of messages.
The
Options when reading messages include:
| |
Do not say ``No new messages.''. This is useful in a .login file since this is often the case here. | |
| |
Queries whether there are messages, printing ``There are new messages.'' if there are. The command ``msgs -q'' is often used in login scripts. | |
| |
Print the first part of messages only. | |
| |
Cause only locally originated messages to be reported. | |
num |
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
amp;.msgsrc
file.
Thus
msgs -h 1
prints the first part of all messages. |
-number | Start number messages back from the one indicated in the amp;.msgsrc file, useful for reviews of recent messages. |
| |
Pipe long messages through less(1). | |
Within msgs you can also go to any specific message by typing its number when msgs requests input as to what to do.
/var/msgs/* | |
database | |
~/.msgsrc | number of next message to be presented |
MSGS (1) | August 8, 2018 |
Main index | Section 1 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.