Answered step by step
Verified Expert Solution
Link Copied!

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

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions

Question

Analyse the various techniques of training and learning.

Answered: 1 week ago