Examples of previewing the command history

To move back up the list one command at a time:

      1  ls
      2  pwd
      3  grep Smith address.txt > smiffs.tmp
      4  sort -u post smiff.tmp
      5  lp post
      6  lpq
    ^P lpq
    ^P lp post
    ^P sort -u post smiff.tmp

This takes us back up to command 4. Entering further CTRL-P commands takes you further up the command history.


To to move down the command list carrying on from the example above:

   ^N lp post
   ^N lpq

This moves us back down to command 6. Entering further CTRL-S commands takes you down the command history.


To search up the command history:

   ^R
   (reverse-i-search)`sort': sort -u post smiff.tmp

This searches up the command list for the first command containing the string sort. Repeating CTRL-R continues the search up the command history.

Once found you can edit the command line.


To search down the command list:

   ^S
   (i-search)`grep': grep Smith address.txt > smiffs.tmp

This searches down the command list for the first command containing the string lp. Repeating CTRL-S continues the search down the command history.

Once found you can edit the command line.


[Home] [Search] [Index]