Workbook 6 Flashcards
What is the default shell in Red Hat Enterprise Linux?
/bin/bash
Which of the following would the bash shell interpret as a comment?
blagh
For which of the following tasks is the bash shell commonly used?
Interactively running commands for users
Automated execution of commands from scripts
pon startup, commands from what file are automatically executed by bash?
~/.bashrc
Which of the following key sequences can be used to access portions of bash’s command history?
ESC+
Which command is used to list bash’s command history?
history
Command Output
bash: timelog: Permission denied
timestamp failed
Q) Which of the following command lines could have produced the messages?
date»_space; timelog || echo timestamp failed
or
date»_space; timelog ; echo timestamp failed
Which of the following would run the chmod command only if the mkdir command succeeds?
mkdir mail && chmod 700 mail
Which of the following would run the chmod command only if the mkdir command fails?
mkdir mail || chmod 700 mail
Which of the following would run the chmod command regardless of the success or failure of the mkdir command?
mkdir mail ; chmod 700 mail
Which of the following is the correct way to run the cd and ls commands in a single subshell?
( cd /etc ; ls)
After successfully executing the command line from the previous question, what will your current working directory be?
The same directory from which the command line was executed. The current shell’s working directory would not change.
After running the command line cd /tmp; ls, what is your current working directory?
/tmp (((Chapter 3 WN 6)))