If you want to send a message to all users on linux system, you can use wall command, which sends a message to everybody logged in with their mesg permission set to yes. The message can be given as an argument to wall, or it can be sent to wall’s standard input. When using the standard input from a terminal, the message should be terminated with the EOF key (usually Control-D).
Examples
To send a message “Alert ! Web server under DOS attack !”, type the following command
$ wall Alert ! Web server under DOS attack !
When the message content is complete, press Control-D (CTRL+D) to send message to all users.
To display message “Alert ! Web server under DOS attack !” to all admin group member use wall command with “–g” option as follows:
$ wall -g admin Alert ! Web server under DOS attack !
When the message content is complete, press Control-D (CTRL+D) to send message to all users.
No comments:
Post a Comment