This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



MESG(1)                                  BSD General Commands Manual                                 MESG(1)

NAME
     mesg -- display (do not display) messages from other users

SYNOPSIS
     mesg [n | y]

DESCRIPTION
     The mesg utility is invoked by a user to control write access others have to a terminal device.  Write
     access is allowed by default, and programs such as talk(1) and write(1) may display messages on the
     terminal.

     The first terminal device in the sequence of devices associated with standard input, standard output
     and standard error is affected.

     Options available:

     n     Disallows messages.

     y     Permits messages to be displayed.

     If no arguments are given, mesg displays the present message status to the standard output.

EXAMPLES
     Disallow messages from other users to the current terminal:

           mesg n

     Allow messages from other users to ttyp1 (assuming you are also logged in on that terminal):

           mesg y </dev/ttyp1

DIAGNOSTICS
     The mesg utility exits with one of the following values:

            0    Messages are allowed.
            1    Messages are not allowed.
           >1    An error has occurred.

COMPATIBILITY
     Previous versions of the mesg utility wrote the message status to the standard error output and
     affected the terminal attached to standard error without first trying the standard input or output
     devices.

SEE ALSO
     biff(1), talk(1), wall(1), write(1)

STANDARDS
     The mesg utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').

HISTORY
     A mesg command appeared in Version 1 AT&T UNIX.

BSD                                              May 5, 2002                                             BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...