1.\" $OpenBSD: mesg.1,v 1.12 2007/05/31 19:20:13 jmc Exp $ 2.\" $NetBSD: mesg.1,v 1.3 1994/12/23 07:16:31 jtc Exp $ 3.\" 4.\" Copyright (c) 1987, 1990, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. Neither the name of the University nor the names of its contributors 16.\" may be used to endorse or promote products derived from this software 17.\" without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" @(#)mesg.1 8.1 (Berkeley) 6/6/93 32.\" 33.Dd $Mdocdate: May 31 2007 $ 34.Dt MESG 1 35.Os 36.Sh NAME 37.Nm mesg 38.Nd display (do not display) messages from other users 39.Sh SYNOPSIS 40.Nm mesg 41.Op Cm n | Cm y 42.Sh DESCRIPTION 43The 44.Nm mesg 45utility is invoked by a user to control write access others 46have to the terminal device associated with the standard error 47output. 48Write access is allowed by default, and programs such as 49.Xr talk 1 50and 51.Xr write 1 52may display messages on the terminal. 53.Pp 54The options are as follows: 55.Bl -tag -width Ds 56.It Cm n 57Disallows messages. 58.It Cm y 59Permits messages to be displayed. 60.El 61.Pp 62If no arguments are given, 63.Nm mesg 64displays the present message status to the standard error output. 65.Pp 66The 67.Nm mesg 68utility exits with one of the following values: 69.Bl -tag -width flag -compact -offset indent 70.Pp 71.It Li "\ 0" 72Messages are allowed. 73.It Li "\ 1" 74Messages are not allowed. 75.It Li >1 76An error has occurred. 77.El 78.Sh FILES 79.Bl -tag -width /dev/[pt]ty[pq]? -compact 80.It Pa /dev/[pt]ty[pq]? 81.El 82.Sh SEE ALSO 83.Xr biff 1 , 84.Xr talk 1 , 85.Xr write 1 86.Sh STANDARDS 87The 88.Nm 89utility is compliant with the 90.St -p1003.1-2004 91specification. 92.Sh HISTORY 93A 94.Nm mesg 95command appeared in 96.At v2 . 97