Question: 1 . Create a directory in your home directory called assignment - 3 then, A . List the files that are in the / etc

1. Create a directory in your home directory called assignment-3 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-3 directory called etc-c-files. Redirect any errors that you may encounter with this command to a file in your home directory called etc-errors.
B. Show the contents of the two created files in step 1-A.
C. Explain the results you got in step 1-B
D. Append the contents of the file you created in assignment-1MyFirstFile to the etc-c-files file.
E. Show the new contents of the etc-c-files file
F. Replace any occurrence of the character c in the etc-c-files 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
2. 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.
3. Create a file in your home directory called myPhones
A. Insert at least 5 lines in that file that contain dummy data about different phones. Each line has to have 4 fields separated by the + character indicating the model, cost, colour and weight of a phone. Example: iPhone11+1200+Silver+.25
B. Use the awk command to display the phone models that come in a Silver colour
4. Write a bash shell script named myFirstScript in your assignment-3 directory, in which:
A. Input a product name, that could be car, computer, phone,..etc.
B. Output a list of the top 3 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 4 times
D. Execute the script, then show its exit status
5. 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.
6. 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
7. Find the highest percentage of CPU cycles consumed by a process running on the lab server.
8. Find the configuration file for the rsyslogd daemon, then explain the fields in any of the uncommented lines in that file.
9. 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

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!