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 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
What is the most important for you to choose before you build a network?
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
Computers and Technology, 21.10.2020 08:01
question
Mathematics, 21.10.2020 08:01
question
Mathematics, 21.10.2020 08:01
question
English, 21.10.2020 08:01
question
Mathematics, 21.10.2020 08:01
question
Mathematics, 21.10.2020 08:01
question
Mathematics, 21.10.2020 08:01
Questions on the website: 13722363