Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LINUX Given process 1, please do PROCESS 2. Include the code please. Process1 1. Using the ps-ef and grep command list all processes started by

LINUX Given process 1, please do PROCESS 2. Include the code please. image text in transcribed
image text in transcribed
Process1 1. Using the ps-ef and grep command list all processes started by you (i.e. owned by your userid). (Hint: 'userid' with match with a line that start with userid.) 2. Run command group (echo "Snoozing..."; date; sleep 50; echo "Awake.":date) > sleep.out & Note: Do not omit the parenthesis!!! 3. Repeat 1, identify process number of the process sleep 4. Display the content of file sleep.out 5. Kill the sleep process 6. Repeat 1. and verify that the process sleep no longer exist 7. Display the content of file sleep.out 8. Remove file sleep.out Process 2 1. Run command (date; sleep 45; echo "Done."; date)> date.out in the foreground (i.e. without &) 2. Suspend it with Ctrl-Z. Pay attention to the number in the [I, it will become handy later. This number is the job number of the command that has been suspended. 3. Run command top to display only processes started by you (i.e. associated with your userid). Write down the process ID of the sleep 45 process. Quit command top by entering q. 4. Run command sleep 60 &, repeat step 3 and write down the process ID of the sleep 60 process. Note that top will display both sleep processes so you need to identify the one that is started later. 5. Run command sleep 100&, repeat step 3 and write down the process ID of the sleep 100 process. Run echo "Process ID of sleep 45 is X and process ID of sleep 60 is Y, and that of sleep 100 is Z", where X, Y and Z are process ID of the three sleep processes started earlier 6. 7. Put the previously suspended command into the background with command bg. 8. Run command jobs 9. Bring the command in step 1 back into the foreground with command fs wait until it finishes. 10.Kill the sleep 60 process with the kill command 11.Kill the sleep 100 process with the kill command 12.Run command jobs 13.Using ps ef and grep to list all processes started by you and verify that there is no sleep process remain 14.Display the content of file date.out using the cat command

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago