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.
whoami weekout
echo weekout
date weekout
echo weekout
echo weekout
echo weekout
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.
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.
sleep &
This will create a background process with the sleep command and assign it a PID. Lets see that now.
ps
Lets update the weekout file.
ps weekout
echo weekout
echo weekout
echo weekout
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
jobs l
Update weekout file.
jobs l weekout
echo weekout
echo weekout
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.
kill enterPIDhere
ps
Notice that the sleep process has been terminated. Lets update the weekout file.
ps weekout
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
