HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)

m
mesg(1) mesg(1)
NAME
mesg - permit or deny messages to terminal
SYNOPSIS
mesg
mesg
[[-]g][[
-]n][[-]y]
DESCRIPTION
The command form
mesg [-]n
forbids messages via write by revoking write permission to users without
appropriate privilege on the user’s terminal (see write(1)).
The command form
mesg [-]g
reinstates permission so that only legitimate commands (such as write)
can be used by other users to send messages.
The command form
mesg [-]
y allows applications such as write or talk to send messages to the user’s
terminal (that is, without restrictions).
mesg without any other argument reports the current state without changing it.
RETURN VALUE
mesg returns the following values:
0 Messages are receivable.
1 Messages are not receivable.
2 An error occurred.
EXTERNAL INFLUENCES
Environment Variables
LC_MESSAGES determines the language in which messages are displayed.
If LC_MESSAGES is not specified in the environment or is set to the empty string, the value of
LANG is
used as a default for each unspecified or empty variable. If
LANG is not specified or is set to the empty
string, a default of "C" (see lang(5)) is used instead of LANG.
If any internationalization variable contains an invalid setting,
mesg behaves as if all internationalization
variables are set to "C". See environ(5).
FILES
/dev/tty*
SEE ALSO
write(1).
STANDARDS CONFORMANCE
mesg: SVID2, SVID3, XPG2, XPG3, XPG4
HP-UX 11i Version 2: December 2007 Update 1 Hewlett-Packard Company 659