Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Create a directory in your home directory called assignment - 3 then, A . List the files that are in the / etc
Create a directory in your home directory called assignment then,
A List the files that are in the etc directory that start with the letter c Redirect the output to a file in the assignment directory called etccfiles. Redirect any errors that you may encounter with this command to a file in your home directory called etcerrors.
B Show the contents of the two created files in step A
C Explain the results you got in step B
D Append the contents of the file you created in assignmentMyFirstFile to the etccfiles file.
E Show the new contents of the etccfiles file
F Replace any occurrence of the character c in the etccfiles with the letter z in two different ways one using the pipe metacharacter, the other using the stdin file descriptor Show the contents of the updated or newly created file
Find the value of the environment variable that contains the commands that you previously executed. Then show a list of the commands that you previously used.
Create a file in your home directory called myPhones
A Insert at least lines in that file that contain dummy data about different phones. Each line has to have fields separated by the character indicating the model, cost, colour and weight of a phone. Example: iPhoneSilver
B Use the awk command to display the phone models that come in a Silver colour
Write a bash shell script named myFirstScript in your assignment directory, in which:
A Input a product name, that could be car, computer, phone,..etc.
B Output a list of the top manufacturers of the selected product. Example, if the input is computer, the output could be HP Lenovo, Apple
C Repeat steps A & B for at least times
D Execute the script, then show its exit status
Where is the Linux kernel located?
A Show the kernels size in Kilobytes
B Show the kernels major, minor and revision numbers
C Show the Linux distribution name.
You must be running a shell program when you connect to the lab server.
A Which Shell are you running?
B What is the PID of your Shell
C What is PPID of your Shell
D What is the Priority and Nice value for your Shell
E Show all the processes that led to your Shell
Find the highest percentage of CPU cycles consumed by a process running on the lab server.
Find the configuration file for the rsyslogd daemon, then explain the fields in any of the uncommented lines in that file.
Issue a command to find your own UID and GID. Find any other groups you are a member of if any.
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