Class 13 Quiz Flashcards

1
Q

If you have a copy of the script bother.sh in your current directory, what would you type at the command line to run this script in the background?

A

./bother.sh &

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

If a command is running in the background, can it take input from the keyboard?

A

no

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What would you type at the command line if you wanted to suspend a job running in the foreground?

A

Control Z

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name one of the two ways you make a job running in the background stop running.

A

bring it to the foreground and then stop it using Control C
or
use the kill command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What command would you use to see all currently running jobs?

A

jobs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Once you have suspended a job, what command would you use to send it into the background?

A

bg

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When using the kill command to stop a running job, what information do you give to tell it what to kill?

A

either the job number or the process ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

If you run a command in the background and do not redirect it’s output, where does the output of this command go?

A

to the screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the command to bring a background job into the foreground?

A

fg

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When you run a command in the background, two number appear. What is each of these two numbers?

A

job number and process ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly