Question: Let s get your output file prepped and ready to go for the lab. 1 ) whoami > week 1 3 . out 2 )

Lets get your output file prepped and ready to go for the lab.
1) whoami > week13.out
2) echo >> week13.out
3) date >> week13.out
4) echo >> week13.out
5) echo ***********>> week13.out
6) echo >> week13.out
Now that we have your output file setup with your name, date, and time, lets get started.
Lets look at a couple commands. First, we can see your current running processes.
7) ps
Notice the bash shell (parent process) and the ps command have a Process ID (PID) number assigned to them.
We can create a process that runs in the background so that we can see an additional process.
8) sleep 900 &
This will create a background process with the sleep command and assign it a PID. Lets see that now.
9) ps
Lets update the week13.out file.
10) ps >> week13.out
11) echo >> week13.out
12) echo ***********>> week13.out
13) echo >> week13.out
We can see only the background job (process) with
(NOTE: If there were more than a single background job, we would see all of them using the following
command)
14) jobs -l
Update week13.out file.
15) jobs -l >> week13.out
16) echo ***********>> week13.out
17) echo >> week13.out
Notice that the PID number is the second field. You will need that PID for the next command. Now, lets stop
or kill that process.
18) kill enterPIDhere
19) ps
Notice that the sleep process has been terminated. Lets update the week13.out file.
20) ps >> week13.out

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 Programming Questions!