Question

In: Computer Science

2. Explain how the mesg, write, and wall commands can be used to allow users to...

2. Explain how the mesg, write, and wall commands can be used to allow users to talk to each other on UNIX

Solutions

Expert Solution

Explanation on how the mesg, write, and wall commands can be used to allow users to talk to each other on UNIX:

mesg command: It is a utility invoked by a user to control others' write access to the terminal device associated with standard error output. When write access is allowed, write(1) and other programs either display or does not display messages from other users on the terminal. It controls if non-root users can send messages to your terminal.

Syntax:
mesg [option] [y|n]

y: Allows write access to a user's terminal.
n: Disallows write access to the user's terminal.

Example:

mesg y

write command: It is a utility allowing one user to communicate with other users. It sends a message to another or other users copying lines from one user's terminal to others'. Thus, users are able to talk to each other. When this 'write' command is run, one user writes to get a message of the below form:

Syntax:
write user [tty]

Example:

write John

Writes a message to the user John.

When the command is entered, the user will be placed at a blank line, he/she can type everything which will be sent to the other specified user. Pressing the interrupt character i.e., Ctrl + C, returns the user to the command prompt terminating the write session.

Message from username@userhost on usertty at hh:mm ...

Any subsequent lines the user enters are copied to the specified user's terminal.
For the other user to reply he/she also uses the same 'write' command.

wall command: This command writes a message to all users, thus a user talks to one another or all. It basically, displays a message or the contents of a file, or its standard input, on all the currently logged in users' terminals. The command truncates any lines over 79 characters to new lines.

Syntax: wall [-n] [-t timeout] [-g group] [message | file]

Options:

-n: No banner. It suppresses the banner.
-t: It ignores the write attempt to the terminals after certain timeout seconds.
-g: It limits printing message to members of a group defined as a group argument.

Example:

wall test.txt

This command sends or writes the contents of test.txt file to all users.


Related Solutions

Write a python program that will allow a user to draw by inputting commands. The program...
Write a python program that will allow a user to draw by inputting commands. The program will load all of the commands first (until it reaches command "exit" or "done"), and then create the drawing. Must include the following: change attributes: color [red | green | blue] width [value] heading [value] position [xval] [yval] drawing: draw_axes draw_tri [x1] [y1] [x2] [y2] [x3] [y3 draw_rect [x] [y] [b] [h] draw_poly [x] [y] [n] [s] draw_path [path] random random [color | width...
Write in C++ code A system that allow users to place an order for the food,...
Write in C++ code A system that allow users to place an order for the food, view all the food details, modify or delete the food details. Design using objected oriented programming and list/link-list. Food order information contain : OrderID(auto assigned,unique), Food Code, flavor , weight, unit price, qty and customer information such as id, name, address and contact number. order ID shall be automatically assigned with a unique ID when new order is added. When viewing food details, it...
a.)Which of the following commands can be used to change the stateof a process,...
a.)Which of the following commands can be used to change the state of a process, including to stop a process?endkillstophaltb.)Responding to ping requests can leave a system vulnerable to which of the following?TCP wrappersDoS attacksMan-in-the-middle attacksAll of the abovec.)Which of the following is the de facto standard name resolution solution for the majority of systems connected to the Internet?DHCPLDAPDNSNISd.)DHCP stands for which of the following?Dynamic Host Configuration ProtocolDomain Host Configuration ProtocolDomain Host Configuration ProcessDynamic Host Configuration Processe.)After installing the correct...
Can someone also tell me how to write the commands in excel for 1/T and ln(tgel)....
Can someone also tell me how to write the commands in excel for 1/T and ln(tgel). I have to plot 1/T versus ln(tgel). Cure temp. Gel time Linearized Forms T (K) tgel (h) 1/T (K-1) ln(tgel) 373.15 9.007 383.15 6.200 393.15 4.016 403.15 2.533 413.15 1.711 423.15 1.549 433.15 0.780 443.15 0.619 453.15 0.635 463.15 0.708 473.15 0.549
Write a recommendation of 2 pages on how the movie "The Wolf of Wall Street (2013)''...
Write a recommendation of 2 pages on how the movie "The Wolf of Wall Street (2013)'' is related to strategic management? Does the movie has a surprise ending? If yes, what parts of the movie are unexpected, and do they relate to strategic management? If no, please skip this question. Nb: The movie should be related topics in the lectures or in the textbooks, for example, game theory, corporate merger & acquisition, and corporate governance, etc.
List and describe two (2) ACL commands that may be used in responding to Case#2 in...
List and describe two (2) ACL commands that may be used in responding to Case#2 in Chapter 9
FileWrite a program that will allow two users to play a tic-tac-toe game. You should write...
FileWrite a program that will allow two users to play a tic-tac-toe game. You should write the program such that two people can play the game without any special instructions. (assume they know how to play the game). You should code the program to do the five items below only. You do not have to write the entire program, just the five items below. • Use a 2D array(3 rows, 3 columns) of datatype char. Initialize the 2D array with...
2. Explain how the directional movement of phosphates from ATP to water can be used to...
2. Explain how the directional movement of phosphates from ATP to water can be used to turn on and off proteins, power active transport, and power the directional movement of “walking proteins”. In what way is the powering of walking proteins distinctly different than the other two?
Can you explain how and why the value of shares are diluted when firms allow their...
Can you explain how and why the value of shares are diluted when firms allow their employees to buy the firm's stock at a discount?
Write a Python script that will be used as a calculator to allow simple arithmetic computation...
Write a Python script that will be used as a calculator to allow simple arithmetic computation of two input integer numbers. Requirements: a. The script should first allow the user to select if they want to add, subtract, multiply or divide two integer digits. b. The script should pass the user inputs to a function using arguments for computation and the results return to the main part of the script. c. The return value will be tested to determine if...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT