Workbook 6 Flashcards

1
Q

What is the default shell in Red Hat Enterprise Linux?

A

/bin/bash

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

Which of the following would the bash shell interpret as a comment?

A

blagh

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

For which of the following tasks is the bash shell commonly used?

A

Interactively running commands for users

Automated execution of commands from scripts

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

pon startup, commands from what file are automatically executed by bash?

A

~/.bashrc

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

Which of the following key sequences can be used to access portions of bash’s command history?

A

ESC+

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

Which command is used to list bash’s command history?

A

history

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

Command Output
bash: timelog: Permission denied
timestamp failed
Q) Which of the following command lines could have produced the messages?

A

date&raquo_space; timelog || echo timestamp failed
or
date&raquo_space; timelog ; echo timestamp failed

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

Which of the following would run the chmod command only if the mkdir command succeeds?

A

mkdir mail && chmod 700 mail

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

Which of the following would run the chmod command only if the mkdir command fails?

A

mkdir mail || chmod 700 mail

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

Which of the following would run the chmod command regardless of the success or failure of the mkdir command?

A

mkdir mail ; chmod 700 mail

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

Which of the following is the correct way to run the cd and ls commands in a single subshell?

A

( cd /etc ; ls)

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

After successfully executing the command line from the previous question, what will your current working directory be?

A

The same directory from which the command line was executed. The current shell’s working directory would not change.

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

After running the command line cd /tmp; ls, what is your current working directory?

A

/tmp (((Chapter 3 WN 6)))

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