Asciidoc: Import term-utils man pages

This commit is contained in:
Mario Blättermann 2021-03-14 10:48:27 +01:00
parent 84851dc21f
commit 6cac37e3c1
8 changed files with 1181 additions and 0 deletions

332
term-utils/agetty.8.adoc Normal file
View File

@ -0,0 +1,332 @@
////
////
= agetty(8)
:doctype: manpage
:man manual: System Administration
:man source: util-linux {release-version}
:page-layout: base
:command: agetty
== NAME
agetty - alternative Linux getty
== SYNOPSIS
*agetty* [_options_] _port_ [_baud_rate_...] [_term_]
== DESCRIPTION
*agetty* opens a tty port, prompts for a login name and invokes the /bin/login command. It is normally invoked by *init*(8).
*agetty* has several _non-standard_ features that are useful for hardwired and for dial-in lines:
* Adapts the tty settings to parity bits and to erase, kill, end-of-line and uppercase characters when it reads a login name. The program can handle 7-bit characters with even, odd, none or space parity, and 8-bit characters with no parity. The following special characters are recognized: Control-U (kill); DEL and backspace (erase); carriage return and line feed (end of line). See also the *--erase-chars* and *--kill-chars* options.
* Optionally deduces the baud rate from the CONNECT messages produced by Hayes(tm)-compatible modems.
* Optionally does not hang up when it is given an already opened line (useful for call-back applications).
* Optionally does not display the contents of the _/etc/issue_ file.
* Optionally displays an alternative issue files or directories instead of _/etc/issue_ or _/etc/issue.d_.
* Optionally does not ask for a login name.
* Optionally invokes a non-standard login program instead of _/bin/login_.
* Optionally turns on hardware flow control.
* Optionally forces the line to be local with no need for carrier detect.
This program does not use the _/etc/gettydefs_ (System V) or _/etc/gettytab_ (SunOS 4) files.
== ARGUMENTS
_port_::
A path name relative to the `/dev` directory. If a "-" is specified, *agetty* assumes that its standard input is already connected to a tty port and that a connection to a remote user has already been established. +
Under System V, a "-" _port_ argument should be preceded by a "--".
_baud_rate_,...::
A comma-separated list of one or more baud rates. Each time *agetty* receives a BREAK character it advances through the list, which is treated as if it were circular. +
Baud rates should be specified in descending order, so that the null character (Ctrl-@) can also be used for baud-rate switching. +
This argument is optional and unnecessary for *virtual terminals*. +
The default for *serial terminals* is keep the current baud rate (see *--keep-baud*) and if unsuccessful then default to '9600'.
_term_::
The value to be used for the *TERM* environment variable. This overrides whatever *init*(1) may have set, and is inherited by login and the shell. +
The default is 'vt100', or 'linux' for Linux on a virtual terminal, or 'hurd' for GNU Hurd on a virtual terminal.
== OPTIONS
-8, --8bits::
Assume that the tty is 8-bit clean, hence disable parity detection.
-a, --autologin _username_::
Automatically log in the specified user without asking for a username or password. Using this option causes an *-f* _username_ option and argument to be added to the */bin/login* command line. See *--login-options*, which can be used to modify this option's behavior. +
Note that *--autologin* may affect the way in which *getty* initializes the serial line, because on auto-login *agetty* does not read from the line and it has no opportunity optimize the line setting.
-c, --noreset::
Do not reset terminal cflags (control modes). See *termios*(3) for more details.
-E, --remote::
Typically the login1 command is given a remote hostname when called by something such as telnetd8. This option allows *agetty* to pass what it is using for a hostname to *login*(1) for use in *utmp*(5). See *--host*, *login*(1), and *utmp*(5). +
If the *--host* _fakehost_ option is given, then an *-h* _fakehost_ option and argument are added to the _/bin/login_ command line. +
If the *--nohostname* option is given, then an *-H* option is added to the */bin/login* command line. +
See *--login-options*.
-f, --issue-file _path_::
Specifies a ":" delimited list of files and directories to be displayed instead of _/etc/issue_ (or other). All specified files and directories are displayed, missing or empty files are silently ignored. If the specified path is a directory then display all files with .issue file extension in version-sort order from the directory. This allows custom messages to be displayed on different terminals. The *--noissue* option will override this option.
--show-issue::
Display the current issue file (or other) on the current terminal and exit. Use this option to review the current setting, it is not designed for any other purpose. Note that output may use some default or incomplete information as proper output depends on terminal and agetty command line.
-h, --flow-control::
Enable hardware (RTS/CTS) flow control. It is left up to the application to disable software (XON/XOFF) flow protocol where appropriate.
-H, --host _fakehost_::
Write the specified _fakehost_ into the utmp file. Normally, no login host is given, since *agetty* is used for local hardwired connections and consoles. However, this option can be useful for identifying terminal concentrators and the like.
-i, --noissue::
Do not display the contents of _/etc/issue_ (or other) before writing the login prompt. Terminals or communications hardware may become confused when receiving lots of text at the wrong baud rate; dial-up scripts may fail if the login prompt is preceded by too much text.
-I, --init-string _initstring_::
Set an initial string to be sent to the tty or modem before sending anything else. This may be used to initialize a modem. Non-printable characters may be sent by writing their octal code preceded by a backslash (\). For example, to send a linefeed character (ASCII 10, octal 012), write \12.
-J, --noclear::
Do not clear the screen before prompting for the login name. By default the screen is cleared.
-l, --login-program _login_program_::
Invoke the specified _login_program_ instead of /bin/login. This allows the use of a non-standard login program. Such a program could, for example, ask for a dial-up password or use a different password file. See *--login-options*.
-L, --local-line[=__mode__]::
Control the CLOCAL line flag. The optional _mode_ argument is 'auto', 'always' or 'never'. If the _mode_ argument is omitted, then the default is 'always'. If the *--local-line* option is not given at all, then the default is 'auto'.
____
_always_::
Forces the line to be a local line with no need for carrier detect. This can be useful when you have a locally attached terminal where the serial line does not set the carrier-detect signal.
_never_::
Explicitly clears the CLOCAL flag from the line setting and the carrier-detect signal is expected on the line.
_auto_::
The *agetty* default. Does not modify the CLOCAL setting and follows the setting enabled by the kernel.
____
-m, --extract-baud::
Try to extract the baud rate from the CONNECT status message produced by Hayes(tm)-compatible modems. These status messages are of the form: "<junk><speed><junk>". *agetty* assumes that the modem emits its status message at the same speed as specified with (the first) _baud_rate_ value on the command line. +
Since the *--extract-baud* feature may fail on heavily-loaded systems, you still should enable BREAK processing by enumerating all expected baud rates on the command line.
--list-speeds::
Display supported baud rates. These are determined at compilation time.
-n, --skip-login::
Do not prompt the user for a login name. This can be used in connection with the *--login-program* option to invoke a non-standard login process such as a BBS system. Note that with the *--skip-login* option, *agetty* gets no input from the user who logs in and therefore will not be able to figure out parity, character size, and newline processing of the connection. It defaults to space parity, 7 bit characters, and ASCII CR (13) end-of-line character. Beware that the program that *agetty* starts (usually /bin/login) is run as root.
-N, --nonewline::
Do not print a newline before writing out _/etc/issue_.
-o, --login-options _login_options_::
Options and arguments that are passed to *login*(1). Where \u is replaced by the login name. For example: +
*--login-options '-h darkstar -- \u'* +
See *--autologin*, *--login-program* and *--remote*. +
Please read the SECURITY NOTICE below before using this option.
-p, --login-pause::
Wait for any key before dropping to the login prompt. Can be combined with *--autologin* to save memory by lazily spawning shells.
-r, --chroot _directory_::
Change root to the specified directory.
-R, --hangup::
Call *vhangup*(2) to do a virtual hangup of the specified terminal.
-s, --keep-baud::
Try to keep the existing baud rate. The baud rates from the command line are used when *agetty* receives a BREAK character. If another baud rates specified then the original baud rate is also saved to the end of the wanted baud rates list. This can be used to return to the original baud rate after unexpected BREAKs.
-t, --timeout _timeout_::
Terminate if no user name could be read within _timeout_ seconds. Use of this option with hardwired terminal lines is not recommended.
-U, --detect-case::
Turn on support for detecting an uppercase-only terminal. This setting will detect a login name containing only capitals as indicating an uppercase-only terminal and turn on some upper-to-lower case conversions. Note that this has no support for any Unicode characters.
-w, --wait-cr::
Wait for the user or the modem to send a carriage-return or a linefeed character before sending the _/etc/issue_ file (or others) and the login prompt. This is useful with the *--init-string* option.
--nohints::
Do not print hints about Num, Caps and Scroll Locks.
--nohostname::
By default the hostname will be printed. With this option enabled, no hostname at all will be shown.
--long-hostname::
By default the hostname is only printed until the first dot. With this option enabled, the fully qualified hostname by *gethostname*(3P) or (if not found) by *getaddrinfo*(3) is shown.
--erase-chars _string_::
This option specifies additional characters that should be interpreted as a backspace ("ignore the previous character") when the user types the login name. The default additional ´erase´ has been ´#´, but since util-linux 2.23 no additional erase characters are enabled by default.
--kill-chars _string_::
This option specifies additional characters that should be interpreted as a kill ("ignore all previous characters") when the user types the login name. The default additional ´kill´ has been ´@´, but since util-linux 2.23 no additional kill characters are enabled by default.
--chdir _directory_::
Change directory before the login.
--delay _number_::
Sleep seconds before open tty.
--nice _number_::
Run login with this priority.
--reload::
Ask all running agetty instances to reload and update their displayed prompts, if the user has not yet commenced logging in. After doing so the command will exit. This feature might be unsupported on systems without Linux *inotify*(7).
--version::
Display version information and exit.
--help::
Display help text and exit.
== EXAMPLE
This section shows examples for the process field of an entry in the _/etc/inittab_ file. You'll have to prepend appropriate values for the other fields. See *inittab*(5) for more details.
For a hardwired line or a console tty:
____
*/sbin/agetty 9600 ttyS1*
____
For a directly connected terminal without proper carrier-detect wiring (try this if your terminal just sleeps instead of giving you a password: prompt):
____
*/sbin/agetty --local-line 9600 ttyS1 vt100*
____
For an old-style dial-in line with a 9600/2400/1200 baud modem:
____
*/sbin/agetty --extract-baud --timeout 60 ttyS1 9600,2400,1200*
____
For a Hayes modem with a fixed 115200 bps interface to the machine (the example init string turns off modem echo and result codes, makes modem/computer DCD track modem/modem DCD, makes a DTR drop cause a disconnection, and turns on auto-answer after 1 ring):
____
*/sbin/agetty --wait-cr --init-string 'ATE0Q1&D2&C1S0=1\015' 115200 ttyS1*
____
== SECURITY NOTICE
If you use the *--login-program* and *--login-options* options, be aware that a malicious user may try to enter lognames with embedded options, which then get passed to the used login program. Agetty does check for a leading "-" and makes sure the logname gets passed as one parameter (so embedded spaces will not create yet another parameter), but depending on how the login binary parses the command line that might not be sufficient. Check that the used login program cannot be abused this way.
Some programs use "--" to indicate that the rest of the command line should not be interpreted as options. Use this feature if available by passing "--" before the username gets passed by \u.
== ISSUE FILES
The default issue file is _/etc/issue_. If the file exists, then *agetty* also checks for _/etc/issue.d_ directory. The directory is optional extension to the default issue file and content of the directory is printed after _/etc/issue_ content. If the _/etc/issue_ does not exist, then the directory is ignored. All files *with .issue extension* from the directory are printed in version-sort order. The directory can be used to maintain 3rd-party messages independently on the primary system _/etc/issue_ file.
Since version 2.35 additional locations for issue file and directory are supported. If the default _/etc/issue_ does not exist, then *agetty* checks for _/run/issue_ and _/run/issue.d_, thereafter for _/usr/lib/issue_ and _/usr/lib/issue.d_. The directory _/etc_ is expected for host specific configuration, _/run_ is expected for generated stuff and _/usr/lib_ for static distribution maintained configuration.
The default path maybe overridden by *--issue-file* option. In this case specified path has to be file or directory and all the default issue file and directory locations are ignored.
The issue file feature can be completely disabled by *--noissue* option.
It is possible to review the current issue file by *agetty --show-issue* on the current terminal.
The issue files may contain certain escape codes to display the system name, date, time et cetera. All escape codes consist of a backslash (\) immediately followed by one of the characters listed below.
4 or 4{_interface_}::
Insert the IPv4 address of the specified network interface (for example: \4\{eth0}). If the _interface_ argument is not specified, then select the first fully configured (UP, non-LOCALBACK, RUNNING) interface. If not any configured interface is found, fall back to the IP address of the machine's hostname.
6 or 6{_interface_}::
The same as \4 but for IPv6.
b::
Insert the baudrate of the current line.
d::
Insert the current date.
e or e{_name_}::
Translate the human-readable _name_ to an escape sequence and insert it (for example: \e{red}Alert text.\e{reset}). If the _name_ argument is not specified, then insert \033. The currently supported names are: black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta, lightred, magenta, red, reset, reverse, yellow and white. All unknown names are silently ignored.
s::
Insert the system name (the name of the operating system). Same as 'uname -s'. See also the \S escape code.
S or S{VARIABLE}::
Insert the VARIABLE data from _/etc/os-release_. If this file does not exist then fall back to _/usr/lib/os-release_. If the VARIABLE argument is not specified, then use PRETTY_NAME from the file or the system name (see \s). This escape code can be used to keep _/etc/issue_ distribution and release independent. Note that \S{ANSI_COLOR} is converted to the real terminal escape sequence.
l::
Insert the name of the current tty line.
m::
Insert the architecture identifier of the machine. Same as *uname -m*.
n::
Insert the nodename of the machine, also known as the hostname. Same as *uname -n*.
o::
Insert the NIS domainname of the machine. Same as *hostname -d*.
O::
Insert the DNS domainname of the machine.
r::
Insert the release number of the OS. Same as *uname -r*.
t::
Insert the current time.
u::
Insert the number of current users logged in.
U::
Insert the string "1 user" or "<n> users" where <n> is the number of current users logged in.
v::
Insert the version of the OS, that is, the build-date and such.
An example. On my system, the following _/etc/issue_ file:
....
This is \n.\o (\s \m \r) \t
....
displays as:
....
This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
....
== FILES
_/var/run/utmp_::
the system status file.
_/etc/issue_::
printed before the login prompt.
_/etc/os-release /usr/lib/os-release_::
operating system identification data.
_/dev/console_::
problem reports (if *syslog*(3) is not used).
_/etc/inittab_::
*init*(8) configuration file for SysV-style init daemon.
== BUGS
The baud-rate detection feature (the *--extract-baud* option) requires that *agetty* be scheduled soon enough after completion of a dial-in call (within 30 ms with modems that talk at 2400 baud). For robustness, always use the *--extract-baud* option in combination with a multiple baud rate command-line argument, so that BREAK processing is enabled.
The text in the _/etc/issue_ file (or other) and the login prompt are always output with 7-bit characters and space parity.
The baud-rate detection feature (the *--extract-baud* option) requires that the modem emits its status message _after_ raising the DCD line.
== DIAGNOSTICS
Depending on how the program was configured, all diagnostics are written to the console device or reported via the *syslog*(3) facility. Error messages are produced if the _port_ argument does not specify a terminal device; if there is no utmp entry for the current process (System V only); and so on.
== AUTHORS
mailto:werner@suse.de[Werner Fink] +
mailto:kzak@redhat.com[Karel Zak]
The original *agetty* for serial terminals was written by mailto:wietse@wzv.win.tue.nl[W.Z. Venema] and ported to Linux by mailto:poe@daimi.aau.dk[Peter Orbaek].
include::../man-common/bugreports.adoc[]
include::../man-common/footer.adoc[]
ifdef::translation[]
include::../man-common/translation.adoc[]
endif::[]

114
term-utils/mesg.1.adoc Normal file
View File

@ -0,0 +1,114 @@
////
Copyright (c) 1987, 1990, 1993
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@(#)mesg.1 8.1 (Berkeley) 6/6/93
////
= mesg(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: mesg
== NAME
mesg - display (or do not display) messages from other users
== SYNOPSIS
*mesg* [_option_] [*n*|*y*]
== DESCRIPTION
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.
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.
The *mesg* utility silently exits with error status 2 if not executed on terminal. In this case execute *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.
== ARGUMENTS
*n*::
Disallow messages.
*y*::
Allow messages to be displayed.
If no arguments are given, *mesg* shows the current message status on standard error output.
== OPTIONS
*-v*, *--verbose*::
Explain what is being done.
*-V*, *--version*::
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
== EXIT STATUS
The *mesg* utility exits with one of the following values:
____
*0*::
Messages are allowed.
*1*::
Messages are not allowed.
*>1*::
An error has occurred.
____
== FILES
_/dev/[pt]ty[pq]?_
== HISTORY
A *mesg* command appeared in Version 6 AT&T UNIX.
== SEE ALSO
*login*(1),
*talk*(1),
*write*(1),
*wall*(1),
*xterm*(1)
include::../man-common/bugreports.adoc[]
include::../man-common/footer.adoc[]
ifdef::translation[]
include::../man-common/translation.adoc[]
endif::[]

172
term-utils/script.1.adoc Normal file
View File

@ -0,0 +1,172 @@
////
Copyright (c) 1980, 1990 Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@(#)script.1 6.5 (Berkeley) 7/27/91
////
= script(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: script
== NAME
script - make typescript of terminal session
== SYNOPSIS
*script* [_options_] [_file_]
== DESCRIPTION
*script* makes a typescript of everything on your terminal session. The terminal data are stored in raw form to the log file and information about timing to another (optional) structured log file. The timing log file is necessary to replay the session later by *scriptreplay*(1) and to store additional information about the session.
Since version 2.35, *script* supports multiple streams and allows the logging of input and output to separate files or all the one file. This version also supports new timing file which records additional information. The command *scriptreplay --summary* then provides all the information.
If the argument _file_ or option *--log-out* _file_ is given, *script* saves the dialogue in this _file_. If no filename is given, the dialogue is saved in the file _typescript_.
Note that logging input using *--log-in* or *--log-io* may record security-sensitive information as the log file contains all terminal session input (e.g., passwords) independently of the terminal echo flag setting.
== OPTIONS
Below, the _size_ argument may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB"), or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
*-a*, *--append*::
Append the output to _file_ or to _typescript_, retaining the prior contents.
*-c*, *--command* _command_::
Run the _command_ rather than an interactive shell. This makes it easy for a script to capture the output of a program that behaves differently when its stdout is not a tty.
*-E*, *--echo* _when_::
This option controls the *ECHO* flag for the slave end of the session's pseudoterminal. The supported modes are _always_, _never_, or _auto_. +
The default is _auto_ -- in this case, *ECHO* enabled for the pseudoterminal slave; if the current standard input is a terminal, *ECHO* is disabled for it to prevent double echo; if the current standard input is not a terminal (for example pipe: *echo date | script*) then keeping *ECHO* enabled for the pseudoterminal slave enables the standard input data to be viewed on screen while being recorded to session log simultaneously. +
Note that 'never' mode affects content of the session output log, because users input is not repeated on output.
*-e*, *--return*::
Return the exit status of the child process. Uses the same format as bash termination on signal termination (i.e., exit status is 128 + the signal number). The exit status of the child process is always stored in the type script file too.
*-f*, *--flush*::
Flush output after each write. This is nice for telecooperation: one person does *mkfifo foo; script -f foo*, and another can supervise in real-time what is being done using *cat foo*. Note that flush has an impact on performance; it's possible to use *SIGUSR1* to flush logs on demand.
*--force*::
Allow the default output file _typescript_ to be a hard or symbolic link. The command will follow a symbolic link.
*-B*, *--log-io* _file_::
Log input and output to the same _file_. Note, this option makes sense only if *--log-timing* is also specified, otherwise it's impossible to separate output and input streams from the log _file_.
*-I*, *--log-in* _file_::
Log input to the _file_. The log output is disabled if only *--log-in* specified. +
Use this logging functionality carefully as it logs all input, including input when terminal has disabled echo flag (for example, password inputs).
*-O*, *--log-out* _file_::
Log output to the _file_. The default is to log output to the file with name _typescript_ if the option *--log-out* or *--log-in* is not given. The log output is disabled if only *--log-in* specified.
*-T*, *--log-timing* _file_::
Log timing information to the _file_. Two timing file formats are supported now. The classic format is used when only one stream (input or output) logging is enabled. The multi-stream format is used on *--log-io* or when *--log-in* and *--log-out* are used together. See also *--logging-format*.
*-m*, *--logging-format* _format_::
Force use of _advanced_ or _classic_ format. The default is the classic format to log only output and the advanced format when input as well as output logging is requested. +
*Classic format*:::
The log contains two fields, separated by a space. The first field indicates how much time elapsed since the previous output. The second field indicates how many characters were output this time.
*Advanced (multi-stream) format*:::
The first field is an entry type identifier ('I'nput, 'O'utput, 'H'eader, 'S'ignal). The socond field is how much time elapsed since the previous entry, and the rest of the entry is type-specific data.
*-o*, *--output-limit* _size_::
Limit the size of the typescript and timing files to _size_ and stop the child process after this size is exceeded. The calculated file size does not include the start and done messages that the *script* command prepends and appends to the child process output. Due to buffering, the resulting output file might be larger than the specified value.
*-q*, *--quiet*::
Be quiet (do not write start and done messages to standard output).
*-t*[_file_], *--timing*[=_file_]::
Output timing data to standard error, or to _file_ when given. This option is deprecated in favour of *--log-timing* where the _file_ argument is not optional.
*-V*, *--version*::
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
== SIGNALS
Upon receiving *SIGUSR1*, *script* immediately flushes the output files.
== ENVIRONMENT
The following environment variable is utilized by *script*:
*SHELL*::
If the variable *SHELL* exists, the shell forked by *script* will be that shell. If *SHELL* is not set, the Bourne shell is assumed. (Most shells set this variable automatically).
== NOTES
The script ends when the forked shell exits (a _control-D_ for the Bourne shell (*sh*(1p)), and _exit_, _logout_ or _control-d_ (if _ignoreeof_ is not set) for the C-shell, *csh*(1)).
Certain interactive commands, such as *vi*(1), create garbage in the typescript file. *script* works best with commands that do not manipulate the screen, the results are meant to emulate a hardcopy terminal.
It is not recommended to run *script* in non-interactive shells. The inner shell of *script* is always interactive, and this could lead to unexpected results. If you use *script* in the shell initialization file, you have to avoid entering an infinite loop. You can use for example the *­.profile* file, which is read by login shells only:
....
if test -t 0 ; then
script
exit
fi
....
You should also avoid use of *script* in command pipes, as *script* can read more input than you would expect.
== HISTORY
The *script* command appeared in 3.0BSD.
== BUGS
*script* places _everything_ in the log file, including linefeeds and backspaces. This is not what the naive user expects.
*script* is primarily designed for interactive terminal sessions. When stdin is not a terminal (for example: *echo foo | script*), then the session can hang, because the interactive shell within the script session misses EOF and *script* has no clue when to close the session. See the *NOTES* section for more information.
== SEE ALSO
*csh*(1) (for the _history_ mechanism),
*scriptreplay*(1),
*scriptlive*(1)
include::../man-common/bugreports.adoc[]
include::../man-common/footer.adoc[]
ifdef::translation[]
include::../man-common/translation.adoc[]
endif::[]

View File

@ -0,0 +1,87 @@
= scriptlive(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: scriptlive
== NAME
scriptlive - re-run session typescripts, using timing information
== SYNOPSIS
*scriptlive* [_options_] [*-t*] _timingfile_ [*-I*|*-B*] _typescript_
== DESCRIPTION
This program re-runs a typescript, using stdin typescript and timing information to ensure that input happens in the same rhythm as it originally appeared when the script was recorded.
The *session is executed* in a newly created pseudoterminal with the user's $SHELL (or defaults to _/bin/bash_).
*Be careful!* Do not forget that the typescript may contains arbitrary commands. It is recommended to use *"scriptreplay --stream in --log-in typescript"* (or with *--log-io* instead of *--log-in* to verify the typescript before it is executed by *scriptlive*.
The timing information is what script1 outputs to file specified by *--log-timing*. The typescript has to contain stdin information and it is what script1 outputs to file specified by *--log-in* or *--log-io*.
== OPTIONS
*-I*, *--log-in* _file_::
File containing *script*'s terminal input.
*-B*, *--log-io* _file_::
File containing *script*'s terminal output and input.
*-t*, *--timing* _file_::
File containing *script*'s timing output. This option overrides old-style arguments.
*-T*, *--log-timing* _file_::
Aliased to *-t*, maintained for compatibility with *script*(1) command-line options.
*-d*, *--divisor* _number_::
Speed up the replay displaying this _number_ of times. The argument is a floating-point number. It's called divisor because it divides the timings by this factor. This option overrides old-style arguments.
*-m*, *--maxdelay* _number_::
Set the maximum delay between updates to _number_ of seconds. The argument is a floating-point number. This can be used to avoid long pauses in the typescript replay.
*-V*, *--version*::
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
== EXAMPLES
....
% script --log-timing file.tm --log-in script.in
Script started, file is script.out
% date
<etc, etc>
% exit
Script done, file is script.out
% scriptlive --log-timing file.tm --log-in script.in
....
== AUTHORS
mailto:kzak@redhat.com[Karel Zak]
== COPYRIGHT
Copyright © 2019 Karel Zak
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Released under the GNU General Public License version 2 or later.
== SEE ALSO
*script*(1),
*scriptreplay*(1)
include::../man-common/bugreports.adoc[]
include::../man-common/footer.adoc[]
ifdef::translation[]
include::../man-common/translation.adoc[]
endif::[]

View File

@ -0,0 +1,105 @@
= scriptreplay(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: scriptreplay
== NAME
scriptreplay - play back typescripts, using timing information
== SYNOPSIS
*scriptreplay* [_options_] [*-t*] _timingfile_ [_typescript_ [_divisor_]
== DESCRIPTION
This program replays a typescript, using timing information to ensure that output happens in the same rhythm as it originally appeared when the script was recorded.
The replay simply displays the information again; the programs that were run when the typescript was being recorded are *not run again*. Since the same information is simply being displayed, *scriptreplay* is only guaranteed to work properly if run on the same type of terminal the typescript was recorded on. Otherwise, any escape characters in the typescript may be interpreted differently by the terminal to which *scriptreplay* is sending its output.
The timing information is what *script*(1) outputs to file specified by *--log-timing*.
By default, the typescript to display is assumed to be named _typescript_, but other filenames may be specified, as the second parameter or with option *--log-out*.
If the third parameter or *--divisor* is specified, it is used as a speed-up multiplier. For example, a speed-up of 2 makes *scriptreplay* go twice as fast, and a speed-up of 0.1 makes it go ten times slower than the original session.
== OPTIONS
*-I*, *--log-in* _file_::
File containing *script*'s terminal input.
*-O*, *--log-out* _file_::
File containing *script*'s terminal output.
*-B*, *--log-io* _file_::
File containing *script*'s terminal output and input.
*-t*, *--timing* _file_::
File containing *script*'s timing output. This option overrides old-style arguments.
*-T*, *--log-timing* _file_::
This is an alias for *-t*, maintained for compatibility with *script*(1) command-line options.
*-s*, *--typescript* _file_::
File containing *script*'s terminal output. Deprecated alias to *--log-out*. This option overrides old-style arguments.
*-c*, *--cr-mode* _mode_::
Specifies how to use the CR (0x0D, carriage return) character from log files. The default mode is _auto_, in this case CR is replaced with line break for stdin log, because otherwise *scriptreplay* would overwrite the same line. The other modes are _never_ and _always_.
*-d*, *--divisor* _number_::
Speed up the replay displaying this _number_ of times. The argument is a floating-point number. It's called divisor because it divides the timings by this factor. This option overrides old-style arguments.
*-m*, *--maxdelay* _number_::
Set the maximum delay between updates to _number_ of seconds. The argument is a floating-point number. This can be used to avoid long pauses in the typescript replay.
*--summary*::
Display details about the session recorded in the specified timing file and exit. The session has to be recorded using _advanced_ format (see *script*(1)) option *--logging-format* for more details).
*-x*, *--stream* _type_::
Forces *scriptreplay* to print only the specified stream. The supported stream types are _in_, _out_, _signal_, or _info_. This option is recommended for multi-stream logs (e.g., *--log-io*) in order to print only specified data.
*-V*, *--version*::
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
== EXAMPLES
....
% script --log-timing file.tm --log-out script.out
Script started, file is script.out
% ls
<etc, etc>
% exit
Script done, file is script.out
% scriptreplay --log-timing file.tm --log-out script.out
....
== AUTHORS
The original *scriptreplay* program was written by mailto:joey@kitenet.net[Joey Hess]. The program was re-written in C by mailto:jay@gnu.org[James Youngman] and mailto:kzak@redhat.com[Karel Zak]
== COPYRIGHT
Copyright © 2008 James Youngman +
Copyright © 2008-2019 Karel Zak
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Released under the GNU General Public License version 2 or later.
== SEE ALSO
*script*(1),
*scriptlive*(1)
include::../man-common/bugreports.adoc[]
include::../man-common/footer.adoc[]
ifdef::translation[]
include::../man-common/translation.adoc[]
endif::[]

179
term-utils/setterm.1.adoc Normal file
View File

@ -0,0 +1,179 @@
////
Copyright 1990 Gordon Irlam (gordoni@cs.ua.oz.au)
Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
Copyright 2000 Colin Watson (cjw44@cam.ac.uk)
Do not restrict distribution.
May be distributed under the GNU General Public License
////
= setterm(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: setterm
== NAME
setterm - set terminal attributes
== SYNOPSIS
*setterm* [_options_]
== DESCRIPTION
*setterm* writes to standard output a character string that will invoke the specified terminal capabilities. Where possible _terminfo_ is consulted to find the string to use. Some options however (marked "virtual consoles only" below) do not correspond to a *terminfo*(5) capability. In this case, if the terminal type is "con" or "linux" the string that invokes the specified capabilities on the PC Minix virtual console driver is output. Options that are not implemented by the terminal are ignored.
== OPTIONS
For boolean options (*on* or *off*), the default is *on*.
Below, an _8-color_ can be *black*, *red*, *green*, *yellow*, *blue*, *magenta*, *cyan*, or *white*.
A _16-color_ can be an _8-color_, or *grey*, or *bright* followed by *red*, *green*, *yellow*, *blue*, *magenta*, *cyan*, or *white*.
The various color options may be set independently, at least on virtual consoles, though the results of setting multiple modes (for example, *--underline* and *--half-bright*) are hardware-dependent.
The optional arguments require '=' (equals sign) and not space between the option and the argument. For example --option=argument.
*--appcursorkeys* on|off::
Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc. will be sent for the cursor keys instead of ESC [ A, ESC [ B, etc. See the _vi and Cursor-Keys_ section of the _Text-Terminal-HOWTO_ for how this can cause problems for *vi* users. Virtual consoles only.
*--append* _console_number_::
Like *--dump*, but appends to the snapshot file instead of overwriting it. Only works if no *--dump* options are given.
*--background* __8-color__|default::
Sets the background text color.
*--blank*[=0-60|force|poke]::
Sets the interval of inactivity, in minutes, after which the screen will be automatically blanked (using APM if available). Without an argument, it gets the blank status (returns which vt was blanked, or zero for an unblanked vt). Virtual consoles only. +
The *force* argument keeps the screen blank even if a key is pressed. +
The *poke* argument unblanks the screen.
*--bfreq*[=_number_]::
Sets the bell frequency in Hertz. Without an argument, it defaults to *0*. Virtual consoles only.
*--blength*[=0-2000]::
Sets the bell duration in milliseconds. Without an argument, it defaults to *0*. Virtual consoles only.
*--blink* on|off::
Turns blink mode on or off. Except on a virtual console, *--blink off* turns off all attributes (bold, half-brightness, blink, reverse).
*--bold* on|off::
urns bold (extra bright) mode on or off. Except on a virtual console, *--bold off* turns off all attributes (bold, half-brightness, blink, reverse).
*--clear*[=all|rest]::
Without an argument or with the argument *all*, the entire screen is cleared and the cursor is set to the home position, just like *clear*(1) does. With the argument *rest*, the screen is cleared from the current cursor position to the end.
*--clrtabs*[=_tab1 tab2 tab3_ ...]::
Clears tab stops from the given horizontal cursor positions, in the range *1-160*. Without arguments, it clears all tab stops. Virtual consoles only.
*--cursor* on|off::
Turns the terminal's cursor on or off.
*--default*::
Sets the terminal's rendering options to the default values.
*--dump*[=_console_number_]::
Writes a snapshot of the virtual console with the given number to the file specified with the *--file* option, overwriting its contents; the default is _screen.dump_. Without an argument, it dumps the current virtual console. This overrides *--append*.
*--file* _filename_::
Sets the snapshot file name for any *--dump* or *--append* options on the same command line. If this option is not present, the default is _screen.dump_ in the current directory. A path name that exceeds the system maximum will be truncated, see *PATH_MAX* from _linux/limits.h_ for the value.
*--foreground* __8-color__|default::
Sets the foreground text color.
*--half-bright* on|off::
Turns dim (half-brightness) mode on or off. Except on a virtual console, *--half-bright off* turns off all attributes (bold, half-brightness, blink, reverse).
*--hbcolor* [bright] _16-color_::
Sets the color for half-bright characters.
*--initialize*::
Displays the terminal initialization string, which typically sets the terminal's rendering options, and other attributes to the default values.
*--inversescreen* on|off::
Swaps foreground and background colors for the whole screen.
*--linewrap* on|off::
Makes the terminal continue on a new line when a line is full.
*--msg* on|off::
Enables or disables the sending of kernel *printk*() messages to the console. Virtual consoles only.
*--msglevel* 0-8::
Sets the console logging level for kernel *printk()* messages. All messages strictly more important than this will be printed, so a logging level of *0* has the same effect as *--msg on* and a logging level of *8* will print all kernel messages. *klogd*(8) may be a more convenient interface to the logging of kernel messages. +
Virtual consoles only.
*--powerdown*[=0-60]::
Sets the VESA powerdown interval in minutes. Without an argument, it defaults to *0* (disable powerdown). If the console is blanked or the monitor is in suspend mode, then the monitor will go into vsync suspend mode or powerdown mode respectively after this period of time has elapsed.
*--powersave* _mode_::
Valid values for _mode_ are: +
*vsync|on*;;
Puts the monitor into VESA vsync suspend mode.
*hsync*;;
Puts the monitor into VESA hsync suspend mode.
*powerdown*;;
Puts the monitor into VESA powerdown mode.
*off*;;
Turns monitor VESA powersaving features.
*--regtabs*[=1-160]::
Clears all tab stops, then sets a regular tab stop pattern, with one tab every specified number of positions. Without an argument, it defaults to *8*. Virtual consoles only.
*--repeat* on|off::
Turns keyboard repeat on or off. Virtual consoles only.
*--reset*::
Displays the terminal reset string, which typically resets the terminal to its power-on state.
*--resize*::
Reset terminal size by assessing maximum row and column. This is useful when actual geometry and kernel terminal driver are not in sync. Most notable use case is with serial consoles, that do not use *ioctl*(3p) but just byte streams and breaks.
*--reverse* on|off::
Turns reverse video mode on or off. Except on a virtual console, *--reverse off* turns off all attributes (bold, half-brightness, blink, reverse).
*--store*::
Stores the terminal's current rendering options (foreground and background colors) as the values to be used at reset-to-default. Virtual consoles only.
*--tabs*[=_tab1 tab2 tab3_ ...]::
Sets tab stops at the given horizontal cursor positions, in the range *1-160*. Without arguments, it shows the current tab stop settings.
*--term* _terminal_name_::
Overrides the *TERM* environment variable.
*--ulcolor* [bright] _16-color_::
Sets the color for underlined characters. Virtual consoles only.
*--underline* on|off::
Turns underline mode on or off.
*--version*::
Displays version information and exits.
*--help*::
Displays a help text and exits.
== COMPATIBILITY
Since version 2.25 *setterm* has support for long options with two hyphens, for example *--help*, beside the historical long options with a single hyphen, for example *-help*. In scripts it is better to use the backward-compatible single hyphen rather than the double hyphen. Currently there are no plans nor good reasons to discontinue single-hyphen compatibility.
== BUGS
Differences between the Minix and Linux versions are not documented.
== SEE ALSO
*stty*(1),
*tput*(1),
*tty*(4),
*terminfo*(5)
include::../man-common/bugreports.adoc[]
include::../man-common/footer.adoc[]
ifdef::translation[]
include::../man-common/translation.adoc[]
endif::[]

97
term-utils/wall.1.adoc Normal file
View File

@ -0,0 +1,97 @@
////
Copyright (c) 1989, 1990 The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@(#)wall.1 6.5 (Berkeley) 4/23/91
////
= wall(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: wall
== NAME
wall - write a message to all users
== SYNOPSIS
*wall* [*-n*] [*-t* _timeout_] [*-g* _group_] [_message_ | _file_]
== DESCRIPTION
*wall* displays a _message_, or the contents of a _file_, or otherwise its standard input, on the terminals of all currently logged in users. The command will wrap lines that are longer than 79 characters. Short lines are whitespace padded to have 79 characters. The command will always put a carriage return and new line at the end of each line.
Only the superuser can write on the terminals of users who have chosen to deny messages or are using a program which automatically denies messages.
Reading from a _file_ is refused when the invoker is not superuser and the program is set-user-ID or set-group-ID.
== OPTIONS
*-n*, *--nobanner*::
Suppress the banner.
*-t*, *--timeout* _timeout_::
Abandon the write attempt to the terminals after _timeout_ seconds. This _timeout_ must be a positive integer. The default value is 300 seconds, which is a legacy from the time when people ran terminals over modem lines.
*-g*, *--group* _group_::
Limit printing message to members of group defined as a _group_ argument. The argument can be group name or GID.
*-V*, *--version*::
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
== NOTES
Some sessions, such as wdm, that have in the beginning of *utmp*(5) ut_type data a ':' character will not get the message from *wall*. This is done to avoid write errors.
== HISTORY
A *wall* command appeared in Version 7 AT&T UNIX.
== SEE ALSO
*mesg*(1),
*talk*(1),
*write*(1),
*shutdown*(8)
include::../man-common/bugreports.adoc[]
include::../man-common/footer.adoc[]
ifdef::translation[]
include::../man-common/translation.adoc[]
endif::[]

95
term-utils/write.1.adoc Normal file
View File

@ -0,0 +1,95 @@
////
Copyright (c) 1989, 1993
The Regents of the University of California. All rights reserved.
This code is derived from software contributed to Berkeley by
Jef Poskanzer and Craig Leres of the Lawrence Berkeley Laboratory.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@(#)write.1 8.1 (Berkeley) 6/6/93
////
= write(1)
:doctype: manpage
:man manual: User commands
:man source: util-linux {release-version}
:page-layout: base
:command: write
== NAME
write - send a message to another user
*write* _user_ [_ttyname_]
== DESCRIPTION
*write* allows you to communicate with other users, by copying lines from your terminal to theirs.
When you run the *write* command, the user you are writing to gets a message of the form:
....
Message from yourname@yourhost on yourtty at hh:mm ...
....
Any further lines you enter will be copied to the specified user's terminal. If the other user wants to reply, they must run *write* as well.
When you are done, type an end-of-file or interrupt character. The other user will see the message *EOF* indicating that the conversation is over.
You can prevent people (other than the superuser) from writing to you with the *mesg*(1) command. Some commands, for example *nroff*(1) and *pr*(1), may automatically disallow writing, so that the output they produce isn't overwritten.
If the user you want to write to is logged in on more than one terminal, you can specify which terminal to write to by giving the terminal name as the second operand to the *write* command. Alternatively, you can let *write* select one of the terminals - it will pick the one with the shortest idle time. This is so that if the user is logged in at work and also dialed up from home, the message will go to the right place.
The traditional protocol for writing to someone is that the string _-o_, either at the end of a line or on a line by itself, means that it's the other person's turn to talk. The string _oo_ means that the person believes the conversation to be over.
== OPTIONS
*-V*, *--version*::
Display version information and exit.
*-h*, *--help*::
Display help text and exit.
== HISTORY
A *write* command appeared in Version 6 AT&T UNIX.
== SEE ALSO
*mesg*(1),
*talk*(1),
*who*(1)
include::../man-common/bugreports.adoc[]
include::../man-common/footer.adoc[]
ifdef::translation[]
include::../man-common/translation.adoc[]
endif::[]