13,420
edits
Changes
→Aliases / Command History
The filename '''~/.bash_history''' stores recently executed command lines
''Examples of commands that use command history:''
<table width="60%"><tr><td width="25%"><span style="font-family:courier;font-weight:bold;><up></span> or <span style="font-family:courier;font-weight:bold;><down></span> </td><td>Move to '''previous''' command or '''next''' command within Bash shell prompt</td></tr><tr><td><span style="font-family:courier;font-weight:bold;>fc -l</span></td><td> display last '''16''' commands</td></tr><tr><td><span style="font-family:courier;font-weight:bold;>history | more</span></td><td>display all stored commands</td></tr><tr><td><span style="font-family:courier;font-weight:bold;>!num</span></td><td>'''re-execute''' an issued command number by command number (determined from ''history'' command)</td></tr><tr><td><span style="font-family:courier;font-weight:bold;>!xxx</span></td><td>'''re-execute''' an issued command beginning with string "xxx"</td></tr></table><br><br>