Examples of running a command from the history list

To run the previous command:

   pwd
   /u/user/eucs/joe
   r
   pwd
   /u/user/eucs/joe

To re-run a command from the history list:

   r 15

This re-runs command number fifteen from the history list.


To re-run the most recent command that starts with a particular string:

   r grep
   grep -n '[dD]on't' tasks \ less

This re-runs the most recent command that starts with the string grep.


[Home] [Search] [Index] This site maintained by system@gantep.edu.tr