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