junxnone / linux

Linux wiki
https://junxnone.github.io/linux/
0 stars 0 forks source link

Tools OS wall #115

Open junxnone opened 1 year ago

junxnone commented 1 year ago

wall

$ wall --help

Usage:
 wall [options] [<file> | <message>]

Write a message to all users.

Options:
 -g, --group <group>     only send message to group
 -n, --nobanner          do not print banner, works only for root
 -t, --timeout <timeout> write timeout in seconds

 -h, --help              display this help
 -V, --version           display version

For more details see wall(1).

UseCase

简单广播

$ wall "The system will be restarted in 10 minutes."
Broadcast message from xxx@xxx (pts/0) (Fri Mar 24 10:22:32 2023

The system will be restarted in 10 minutes.

隐藏 第一行信息 -n

$ sudo wall -n "The system will be restarted in 10 minutes."

广播到 Group -g

$ wall -g devs "The system will be restarted in 10 minutes."