4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / usr.bin / mesg / mesg.1
.\" Copyright (c) 1987, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" %sccs.include.redist.roff%
.\"
.\" @(#)mesg.1 8.1 (Berkeley) %G%
.\"
.Dd
.Dt MESG 1
.Os
.Sh NAME
.Nm mesg
.Nd display (do not display) messages from other users
.Sh SYNOPSIS
.Nm mesg
.Op Cm n | Cm y
.Sh DESCRIPTION
The
.Nm mesg
utility is invoked by a users to control write access others
have to the terminal device associated with the standard error
output.
Write access is allowed by default, and programs such as
.Xr talk 1
and
.Xr write 1
may display messages on the terminal.
.Pp
Options available:
.Bl -tag -width flag
.It Cm n
Disallows messages.
.It Cm y
Permits messages to be displayed.
.El
.Pp
If no arguments are given,
.Nm mesg
displays the present message status to the standard error output.
.Pp
The
.Nm mesg
utility exits with one of the following values:
.Bl -tag -width flag -compact -offset indent
.Pp
.It Li "\ 0"
Messages are allowed.
.It Li "\ 1"
Messages are not allowed.
.It Li "\>1"
An error has occurred.
.El
.Sh FILES
.Bl -tag -width /dev/[pt]ty[pq]? -compact
.It Pa /dev/[pt]ty[pq]?
.El
.Sh SEE ALSO
.Xr biff 1 ,
.Xr talk 1 ,
.Xr write 1
.Sh HISTORY
A
.Nm mesg
command appeared in
.At v6 .