Question: Implementing who command Write a program that can display the list of users currently logged in to the UNIX computer. What to do? Write a

Implementing who command

Write a program that can display the list of users currently logged in to the UNIX computer.

What to do?

  • Write a C program mywho whose behavior resembles that of the system command who as closely as possible. To decide what information in what format mywho should display, run the standard who command on your computer:

~$ who

CS355_u0 pts/2 2018-09-24 -1:28 (24.123.66.134)

CS355_u0 pts/5 2018-09-24 -1:28 (24.123.66.134)

  • mywho is not expected to accept any command line arguments.

Submit

  • A single C source code file with your work.
  • One screenshot (in PNG, JPG or JPEG format) showing the results of executing the standard system command who immediately followed by the results of executing your program mywho on a Linux terminal.
  • Implementing who command Write a program that can display the list of

The image below shows how the program should work comparing to the system command who CS355_ u0@ip-172-31-20-89ssh CS355 u0@54.203.188.223- 80x24 CS355 u0@ip-172-31-20-89: ./mywho cs355-ue pts/0 u30396842 pts/1 CS355 ue pts/2 u30347423 pts/3 u30385567 pts/4 [CS355-@ip-172-31-28-89:-$ who CS355 ue pts/e u30396842 pts/1 CS355 ue pts/2 u30347423 pts/3 u30385567 pts/4 cs355-@ip-172-31-28-89 :.si 219_2-21 219-2-21 219_2-21 219-2-21 219-2-21 ( 149. 152. 23. 48 ) 16: 57 16: 23 16: 59 15: 21 16: 3 149 . 152. 23. 132 ) ( 149. 152 . 23 . 89 ) ( 98. 179 . 183 . 83 ) ( 149 . 152. 23. 48 ) 219_2-21 16: 57 ( 149. 152 . 23 . 48 ) 219-2-21 16: 23 16: 59 ( 149. 152. 23. 132 ) 219-2-21 ( 149 . 152. 23. 89 ) 219_2-21 219_2-21 15: 21 16: 3 ( 98. 179. 183. 83 ) ( 149. 152 . 23 . 48 )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!