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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:40, StephiUnicorni
When running anti-virus software , what could be a reason where recipitent is not guaranteed that data being streamed will not get interrupted?
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, cdavis379
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a. if the manual switch s is on, then the light l is on. b. besides the manual switch, there is a motion detector, m1, which activatesthis light. c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d. the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, ranmmm
The place where the extended axis of the earth would touch the celestial sphere is called the celestial
Answers: 1
image
Computers and Technology, 23.06.2019 18:00, larry5007
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
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 in other subjects:

Konu
English, 01.10.2019 21:00
Konu
Chemistry, 01.10.2019 21:00