<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://stab.st-andrews.ac.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Hdi2u_S12</id>
		<title>Hdi2u S12 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://stab.st-andrews.ac.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Hdi2u_S12"/>
		<link rel="alternate" type="text/html" href="http://stab.st-andrews.ac.uk/wiki/index.php?title=Hdi2u_S12&amp;action=history"/>
		<updated>2026-05-07T23:13:45Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://stab.st-andrews.ac.uk/wiki/index.php?title=Hdi2u_S12&amp;diff=1401&amp;oldid=prev</id>
		<title>Rf: Created page with &quot;= Command history =  * This is another very handy tool for saving typing * Previous commands you have used are stored in your &quot;history&quot;. * You use the up and down arrow keys t...&quot;</title>
		<link rel="alternate" type="text/html" href="http://stab.st-andrews.ac.uk/wiki/index.php?title=Hdi2u_S12&amp;diff=1401&amp;oldid=prev"/>
				<updated>2017-04-19T22:33:13Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Command history =  * This is another very handy tool for saving typing * Previous commands you have used are stored in your &amp;quot;history&amp;quot;. * You use the up and down arrow keys t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Command history =&lt;br /&gt;
&lt;br /&gt;
* This is another very handy tool for saving typing&lt;br /&gt;
* Previous commands you have used are stored in your &amp;quot;history&amp;quot;.&lt;br /&gt;
* You use the up and down arrow keys to travel through all the command you can used previously.&lt;br /&gt;
* The command itself, &amp;lt;code&amp;gt;history&amp;lt;/code&amp;gt;will return a list of the last 15 commands run.&lt;br /&gt;
* Going back sequentially can be a bit tedious, &amp;lt;code&amp;gt;ctrl+r&amp;lt;/code&amp;gt; will accept hints from you and try to find the past comman that most ressembles your hints.&lt;br /&gt;
&lt;br /&gt;
== Exercise ==&lt;br /&gt;
* Try &lt;br /&gt;
 history -3&lt;br /&gt;
 ctrl+r kir&lt;br /&gt;
&lt;br /&gt;
* Are you seeing what you are expecting?&lt;br /&gt;
&lt;br /&gt;
= Keybindings for using the history file =&lt;br /&gt;
&lt;br /&gt;
These commands are run blind. They refer to the command you last ran,&lt;br /&gt;
which most of the time is visible in the line above.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;:&amp;lt;RET&amp;gt;&amp;lt;/code&amp;gt;: save command in history, do not execute.&lt;br /&gt;
* &amp;lt;code&amp;gt;!$&amp;lt;RET&amp;gt;&amp;lt;/code&amp;gt;: the final argument of the last command&lt;br /&gt;
* &amp;lt;code&amp;gt;!!&amp;lt;RET&amp;gt;&amp;lt;/code&amp;gt;: the entire last command&lt;br /&gt;
* &amp;lt;code&amp;gt;!:1-$&amp;lt;RET&amp;gt;&amp;lt;/code&amp;gt;: everthing except the first word of the last command&lt;br /&gt;
* &amp;lt;code&amp;gt;!$&amp;lt;RET&amp;gt;&amp;lt;/code&amp;gt;: the final argument of the last command&lt;br /&gt;
* &amp;lt;code&amp;gt;^then^now&amp;lt;RET&amp;gt;&amp;lt;/code&amp;gt;: replace the first occurence of then in last command with now&lt;br /&gt;
* &amp;lt;code&amp;gt;!!:gs/then/now&amp;lt;RET&amp;gt;&amp;lt;/code&amp;gt;: replace the ALL occurences of &amp;quot;then&amp;quot; in last command with &amp;quot;now&amp;quot;&lt;/div&gt;</summary>
		<author><name>Rf</name></author>	</entry>

	</feed>