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 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