subject

Write a bash shell script named user_details. sh that takes no arguments. the script should identify all currently active user on the system. for each of those users, the script should identify their full name (if one is present), the absolute path of their home directory, the total number of all files in their home directory (including files in subdirectories)(do not count directories as files for this case), the current number of processes owned by the user, and the top seven (7) processes by memory usage. example output of this script is as follows:
thor@muninn ~]$ user_details. sh

user: thor odinson (thor)
logged in: 2019-12-05 14: 27
home directory is /home/thor/
home directory contains 437 files and directories
thor has 84 processes
top 7 processes sorted by memory usage:

pid user ni virt res shr s %cpu %mem time+ command

8934 thor 0 2732664 283392 41524 s 0.0 15.1 1: 50.57 firefox
18590 thor 0 3159188 275080 13456 s 0.0 14.6 8: 29.25 gnome-shell
9253 thor 0 1889768 161468 6212 s 0.0 8.6 0: 03.92 wireshark
18950 thor 0 1109908 71160 4780 s 0.0 3.8 0: 05.89 gnome-software
3855 thor 0 681216 20840 9428 s 0.0 1.1 0: 08.15 gnome-terminal
10526 thor 0 1011968 20276 2564 s 0.0 1.1 0: 13.30 nautilus
10233 thor 0 1701720 20232 880 s 0.0 1.1 0: 00.41 dhcpd

user: odin allfather (odin)
logged in: 2017-01-01 04: 20
home directory is /home/odin/
home directory contains 6539 files and directories
odin has 609 processes

top 7 processes sorted by memory usage:

pid user ni virt res shr s %cpu %mem time+ command

4 odin 0 2732664 283392 41524 s 0.0 11.1 91: 50.57 firefox
590 odin 0 3159188 275080 13456 s 0.0 4.6 28: 29.25 gnome-shell
950 odin 0 1109908 71160 4780 s 0.0 3.8 10: 05.89 gnome-software
55 odin 0 681216 20840 9428 s 0.0 1.1 10: 08.15 gnome-terminal
28 odin 0 1701720 20232 880 s 0.0 1.1 05: 00.41 dhcpd

you should then provide the full details required to execute this script every 15 minutes. provide the full code of the script below on a new page. the font must be formatted as courier, 11pt font. you may receive up to an additional 5 points for providing a screenshot of the script working as required.

note: the process columns must be listed in the order shown
hint: think about which files & commands are needed for each individual component of the output.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
question
Computers and Technology, 22.06.2019 08:00
Aplan to budget time for studying and activities is referred to as a study routine. study habits. study skills. a study schedule.
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 23.06.2019 12:40
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c.transactions o d. rent tab
Answers: 1
You know the right answer?
Write a bash shell script named user_details. sh that takes no arguments. the script should identify...
Questions
question
Mathematics, 09.03.2021 22:20
question
Biology, 09.03.2021 22:30
question
Mathematics, 09.03.2021 22:30
question
Mathematics, 09.03.2021 22:30
question
Mathematics, 09.03.2021 22:30
Questions on the website: 13722362