Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Enter these commands prompt, and try to interpret the output also write the scripts as per instructions and run them. The deliverables should be in

Enter these commands prompt, and try to interpret the output also write the scripts as per instructions and run them. The deliverables should be in APA format wherever necessary you take the screenshots. 1. Try the command sleep 5. What does this command do?

Sleep 5 : This command made delay 5 seconds to be ready for the next command. 2. Run the command in the background using &.

3. Run sleep 15 in the foreground, suspend it with Ctrl-z and then put it into the background with bg. Type jobs. Type ps. Bring the job back into the foreground with fg.

4. Run sleep 15 in the background using &, and then use kill to terminate the process by its job number. Repeat, except this time kill the process by specifying its PID. 5. Run sleep 15 in the background using &, and then use kill to suspend the process. Use bg to continue running the process. 6. Startup a number of sleep 60 processes in the background, and terminate them all at the same time using the pkill command. 7. Use ps, w and top to show all processes that are executing. 8. Use ps -aeH to display the process hierarchy. Look for the init process. See if you can identify important system daemons. Can you also identify your shell and its subprocesses? 9. Combine ps -fae with grep to show all processes that you are executing, with the exception of the ps -fae and grep commands. 10. Start a sleep 300 process running in the background. Log off the server, and log back in again. List all the processes that you are running. What happened to your sleep process? Now repeat, except this time start by running nohup sleep 300. 11. Multiple jobs can be issued from the same command line using the operators ;, && and ||. Try combining the commands cat nonexistent and echo hello using each of these operators. Reverse the order of the commands and try again. What are the rules about when the commands will be executed? 12. What does the xargs command do? Can you combine it with find and grep to find yet another way of searching all files in the /home subdirectory tree for the word hello? 13. What does the cut command do? Can you use it together with w to produce a list of login names and CPU times corresponding to each active process? Can you now (all on the same command line) use sort and head or tail to find the user whose process is using the most CPU? 14. Write a shell script which renames all .txt files as .text files. The command basename might help you here. 15. Write a shell script called pidof which takes a name as parameter and returns the PID(s) of processes with that name

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

More Books

Students also viewed these Databases questions

Question

Strong analytical, communication, and problem-solving skills

Answered: 1 week ago