wall
喵喵 发表于 2020-07-05 08:18浏览次数:
在类似Unix的操作系统上,Wall命令同时向所有其他登录用户写入一条消息。
本文档涵盖了linux版本的Wall。
On Unix-like operating systems, the wall command writes a message simultaneously to all other logged-in users.
This document covers the Linux version of wall.
目录:
1 wall 运行系统环境
2 wall 描述
3 wall 语法
4 wall 选择
5 wall 示例
wall 运行系统环境
wall 描述
Wall在所有当前登录用户的终端上显示文件内容,或者默认情况下显示其标准输入。该命令将所有超过79个字符的行裁剪为新行。短行是空白处,有79个字符。命令总是将回车和新行放在每一行的末尾。
只有超级用户才能在选择拒绝消息或正在使用自动拒绝消息的程序的用户终端上写入。
当调用程序不是超级用户且程序是suid或SGID时,将拒绝读取文件。
wall displays the contents of file or, by default, its standard input, on the terminals of all currently logged-in users. The command will cut any lines that are over 79 characters to new lines. Short lines are white space padded to have 79 characters. The command will always put carriage return and new line at the end of each line.
Only the super-user 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 suid or sgid.
wall 语法
wall [-n] [-t TIMEOUT] [file]
wall [-n] [-t TIMEOUT] [file]
wall 选择
-n, --nobanner
|
压制旗帜
|
-t, --timeout TIMEOUT
|
以秒为单位将TIMEOUT写入终端。 TIMEOUT 必须是正整数。默认值为300秒,这是人们在调制解调器线路上运行终端时遗留下来的。
|
-V, --version
|
显示版本信息并退出。
|
-h, --help
|
显示帮助信息并退出。
|
-n, --nobanner
|
Suppress banner
|
-t, --timeout TIMEOUT
|
Write timeout to terminals in seconds. TIMEOUT must be positive integer. Default value is 300 seconds, which is a legacy from time when people ran terminals over modem lines.
|
-V, --version
|
Display version information and exit.
|
-h, --help
|
Display a help message and exit.
|
wall 示例
sudo wall message.txt
使用sudo命令作为超级用户运行Wall,将message.txt的内容发送给所有用户。
sudo wall message.txt
Using the sudo command to run wall as the superuser, sends the contents of message.txt to all users.