You can also get at the arguments of the previous command line with !!:n, where n is the position of the argument.<p>i.e.<p><pre><code> host:test user$ touch one two three four five
host:test user$ ls
five four one three two
host:test user$ cat four
host:test user$ echo !!:1
echo four
four
</code></pre>
Also, "Esc, dot" is an awesome bash shortcut. (Press them consecutively, not concurrently). It inserts the last argument of the previous command in place. So if you're doing something to the same file, Esc, . will usually bring up the file name.<p>i.e.<p><pre><code> host:test user$ cat five
host:test user$ touch [Esc, .]</code></pre>