Question: Need some help with a Linux bash scripting problem Create a Linux System Information Script (.sh) that displays the output for following items: A. The

Need some help with a Linux bash scripting problem

Create a Linux System Information Script (.sh) that displays the output for following items:

A. The kernel version - Relevant commands: uname

B. The total number of users on the system (Files: /etc/passwd) - Relevant commands: cat, wc

C. A list of user accounts on the system (usernames only) (Files: /etc/passwd) - Relevant commands: cat, cut

D. The total number of commands the root user has run (Files: /root/.bash_history) - Relevant commands: cat, wc

E. A de-duplicated list of users that have actually logged in at some point - Relevant commands: last, cut, sort, uniq

F. A list of any C source-code files - Relevant commands: find

G. A list of any files in /etc/ containing the word documentation - Relevant commands: find, cat, grep

H. The type of CPU in use on the machine (/proc/cpuinfo) - Relevant commands: cat, grep, cut

I. A list of files in /dev/ which begin with the letters sd... - Relevant commands: find

J. Your main network adapters MAC address - Relevant commands: ip a, grep, cut

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!