Previous Section  < Day Day Up >  Next Section

LAB 20: HISTORY

  1. In what file are history events stored when you log out? What variable controls the number of history events to be displayed? What is the purpose of the savehist variable?

  2. Print your history list in reverse.

  3. Print your history list without line numbers.

  4. Type the following commands:

    1. ls -a

    2. date '+%T'

    3. cal 2004

    4. cat /etc/passwd

    5. cd

  5. Type history. What is the output?

    1. How do you re-execute the last command?

    2. Now type: echo a b c

    Use the history command to re-execute the echo command with only its last argument, c.

  6. Use history to print and execute the last command in your history list that started with the letter d.

  7. Execute the last command that started with the letter c.

  8. Execute the echo command and the last argument from the previous command.

  9. Use the history substitution command to replace the T in the date command with an H.

  10. How do you use the bindkey command to start the vi editor for command-line editing?

  11. How do you list the editor commands and what they do?

  12. How do you see how the editing keys are actually bound?

  13. Describe what the fignore variable does.

    Previous Section  < Day Day Up >  Next Section