IPnom Home • Manuals • FreeBSD

 FreeBSD Man Pages

Man Sections:Commands (1)System Calls (2)Library Functions (3)Device Drivers (4)File Formats (5)Miscellaneous (7)System Utilities (8)
Keyword Live Search (10 results max):
 Type in part of a command in the search box.



     msgs -- system messages and junk mail program


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


     The msgs utility is used to read system messages.	These messages are
     sent by mailing to the login `msgs' and should be short pieces of infor-
     mation which are suitable to be read once by most users of the system.

     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 sub-
     ject line, the first few non-blank lines of the message will be dis-
     played.  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.  A `s' or `s-' may be followed by a space and a file
		 name to receive the message replacing the default ``Mes-

     -m 	 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 .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 -s option.  If msgs is run with any
     option other than -s, an error will be displayed if /var/msgs/bounds does
     not exist.

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

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

     superuser to use this option.

     Options when reading messages include:

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

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

     -h 	 Print the first part of messages only.

     -l 	 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 .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.

     -p 	 Pipe long messages through 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.


     The msgs utility uses the HOME and TERM environment variables for the
     default home directory and terminal type.


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


     mail(1), more(1), aliases(5), periodic(8)


     The msgs command appeared in 3.0BSD.

FreeBSD 5.4			April 28, 1995			   FreeBSD 5.4


Man(1) output converted with man2html , sed , awk