Difference between revisions of "Shell/Recall Previous Commands"

From Coder Merlin
(Created page with "== Recall Previous Commands == Sometimes it's expedient to quickly recall a previous command without the need to re-type it. The most common means of accomplishing this is to...")
 
m (Editorial review and minor corrections)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Recall Previous Commands ==
Sometimes it's expedient to quickly recall a previous command without the need to retype it. The most common means of doing this is to use the up arrow.  Let's try it:
Sometimes it's expedient to quickly recall a previous command without the need to re-type it. The most common means of accomplishing this is to use the up-arrow.  Let's try it:
{{ConsoleLine|john-williams@codermerlin:~$ |ls}}
{{ConsoleLine|john-williams@codermerlin:~$ |ls}}


Now, let's repeat the command, but rather than type '''ls''' again, try typing the up-arrow:
Now, let's repeat the command, but rather than typing in '''ls''' again, try pressing the up arrow key:
{{ConsoleLine|john-williams@codermerlin:~$ |{{Key|↑}}}}
{{ConsoleLine|john-williams@codermerlin:~$ |{{Key|↑}}}}


Line 12: Line 11:
# What happens each time you press the {{Key|↓}}?
# What happens each time you press the {{Key|↓}}?
}}
}}
{{MerlinMultipageExperienceNavBar}}

Latest revision as of 13:22, 22 February 2023

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Sometimes it's expedient to quickly recall a previous command without the need to retype it. The most common means of doing this is to use the up arrow. Let's try it:

john-williams@codermerlin:~$  ls

Now, let's repeat the command, but rather than typing in ls again, try pressing the up arrow key:

john-williams@codermerlin:~$  

Try pressing the and several times.

ObserveObserveIcon.png
Observe, Ponder, and Journal: : Section 5
  1. What happens each time you press the ?
  2. What happens each time you press the ?