Class 18 Quiz Flashcards

1
Q

What character would you use if you wanted to run two commands, one right after the other, on a single command line?

A

;

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

What other two characters allow more than one command to be run on a single command line?

A

& and | (the pipe character)

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

How can you continue a command onto the next line?

A

type \ immediately before hitting Enter

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

What does the dirs command do?

A

prints the current directory stack

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

If you wanted to go to the root directory, but wanted to get back to where you were easily, what would you enter at the command line?

A

pushd /

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

If you used the command pushd, what would you type at the command line to get back to the previous directory?

A

popd

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

What is special about a global variable?

A

you can use it in any subshell of the shell in which it was created.

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

What are the limitations of a local variable?

A

you can only use it in the shell in which it was created

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

What would you type at the command line to create the local variable foo and assign it the value “FOO”?

A

foo=FOO

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

What would you type at the command line to create the global variable bar and assign it the value “BAR”?

A

export bar=BAR

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