LAB 20: HISTORY

 <  Day Day Up  >  

  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.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net