Unix Concepts   «Prev  Next»

Unix Conclusion - Quiz

Each question is worth one point. Select the best answer or answers for each question.
 
1. Which of the following will repeat the previous command?
Please select the best answer.
  A. !!
  B. !history
  C. history
  D. !$

2. Assuming you are using the C shell, what does the following command do?
Please select the best answer.
  A. % alias dir ls
  B. Lists the definitions for two aliases named dir and ls.
  C. Produces an error message.
  D. Creates an alias named dir for the command ls.
  E. Displays the definition for the dir alias, then lists your current directory.

3. Suppose you see the following results after entering the history command:
% history
1 cd project
2 ls
3 vi index.html
4 history %
Which two of the following would you enter to rerun the command vi index.html?
Please select all the correct answers.
  A. !3
  B. !!
  C. !vi
  D. vi !$

4. To change your prompt to Hello there, which of the following commands must you enter:
Please select the best answer.
  A. set prompt="Hello there"
  B. setprompt="Hello there"
  C. set prompt=Hello there
  D. set prompt "Hello there"