Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
  • image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions

Question

6. Identify seven types of hidden histories.

Answered: 1 week ago

Question

What is human nature?

Answered: 1 week ago