]>
Commit | Line | Data |
---|---|---|
295b3979 | 1 | //po4a: entry man manual |
6cac37e3 MB |
2 | //// |
3 | Copyright (c) 1987, 1990, 1993 | |
4 | The Regents of the University of California. All rights reserved. | |
5 | ||
6 | Redistribution and use in source and binary forms, with or without | |
7 | modification, are permitted provided that the following conditions | |
8 | are met: | |
9 | 1. Redistributions of source code must retain the above copyright | |
10 | notice, this list of conditions and the following disclaimer. | |
11 | 2. Redistributions in binary form must reproduce the above copyright | |
12 | notice, this list of conditions and the following disclaimer in the | |
13 | documentation and/or other materials provided with the distribution. | |
14 | 3. All advertising materials mentioning features or use of this software | |
15 | must display the following acknowledgement: | |
16 | This product includes software developed by the University of | |
17 | California, Berkeley and its contributors. | |
18 | 4. Neither the name of the University nor the names of its contributors | |
19 | may be used to endorse or promote products derived from this software | |
20 | without specific prior written permission. | |
21 | ||
22 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
23 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
24 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
25 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
26 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
27 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
28 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
29 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
31 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
32 | SUCH DAMAGE. | |
33 | ||
34 | @(#)mesg.1 8.1 (Berkeley) 6/6/93 | |
35 | //// | |
36 | = mesg(1) | |
37 | :doctype: manpage | |
f42ed819 | 38 | :man manual: User Commands |
6cac37e3 MB |
39 | :man source: util-linux {release-version} |
40 | :page-layout: base | |
41 | :command: mesg | |
42 | ||
43 | == NAME | |
44 | ||
45 | mesg - display (or do not display) messages from other users | |
46 | ||
47 | == SYNOPSIS | |
48 | ||
49 | *mesg* [_option_] [*n*|*y*] | |
50 | ||
51 | == DESCRIPTION | |
52 | ||
53 | The *mesg* utility is invoked by a user to control write access others have to the terminal device associated with standard error output. If write access is allowed, then programs such as *talk*(1) and *write*(1) may display messages on the terminal. | |
54 | ||
55 | Traditionally, write access is allowed by default. However, as users become more conscious of various security risks, there is a trend to remove write access by default, at least for the primary login shell. To make sure your ttys are set the way you want them to be set, *mesg* should be executed in your login scripts. | |
56 | ||
03a8f430 | 57 | The *mesg* utility silently exits with error status 2 if not executed on a terminal. In this case executing *mesg* is pointless. The command line option *--verbose* forces *mesg* to print a warning in this situation. This behaviour has been introduced in version 2.33. |
6cac37e3 MB |
58 | |
59 | == ARGUMENTS | |
60 | ||
61 | *n*:: | |
28f4f1a3 | 62 | Disallow messages. |
6cac37e3 MB |
63 | |
64 | *y*:: | |
28f4f1a3 | 65 | Allow messages to be displayed. |
6cac37e3 MB |
66 | |
67 | If no arguments are given, *mesg* shows the current message status on standard error output. | |
68 | ||
69 | == OPTIONS | |
70 | ||
71 | *-v*, *--verbose*:: | |
28f4f1a3 | 72 | Explain what is being done. |
6cac37e3 | 73 | |
2b2d3172 | 74 | include::man-common/help-version.adoc[] |
6cac37e3 MB |
75 | |
76 | == EXIT STATUS | |
77 | ||
78 | The *mesg* utility exits with one of the following values: | |
79 | ||
6cac37e3 | 80 | *0*:: |
28f4f1a3 | 81 | Messages are allowed. |
6cac37e3 | 82 | *1*:: |
28f4f1a3 | 83 | Messages are not allowed. |
6cac37e3 | 84 | *>1*:: |
28f4f1a3 | 85 | An error has occurred. |
6cac37e3 MB |
86 | |
87 | == FILES | |
88 | ||
03a8f430 | 89 | _/dev/[pt]ty*_, _/dev/pts/[0-9]*_ |
6cac37e3 MB |
90 | |
91 | == HISTORY | |
92 | ||
03a8f430 | 93 | *mesg* (I) appears in the UNIX Programmer's Manual. |
94 | It used to invert the current state with no argument before Version 7 AT&T UNIX. | |
6cac37e3 MB |
95 | |
96 | == SEE ALSO | |
97 | ||
98 | *login*(1), | |
99 | *talk*(1), | |
100 | *write*(1), | |
101 | *wall*(1), | |
102 | *xterm*(1) | |
103 | ||
625e9c61 | 104 | include::man-common/bugreports.adoc[] |
6cac37e3 | 105 | |
625e9c61 | 106 | include::man-common/footer.adoc[] |
6cac37e3 MB |
107 | |
108 | ifdef::translation[] | |
625e9c61 | 109 | include::man-common/translation.adoc[] |
6cac37e3 | 110 | endif::[] |