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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started