12. Bash Shell History Record Operations
Contents
With the command reuse feature of the bash shell, it is easy to use a previous command again or to see what commands we have recently used.
Check history's definition and usage
History File Location
|
|
the file that records the used commands
History Size
|
|
these two commands show the amount of the lines of commands they can keep
History List
|
|
shows all recently used commands
Run Previous Command
|
|
!! reexecutes the ls command
Run Recorded Command
|
|
Delete Executed Command
|
|
the previous command is pwd not ls
Run Commands Without Saving
|
|
To temporarily unset the $HISTFILE variable
Empty History Records
|
|
References 9.1 Bash History Facilities, 9.2 Bash History Builtins, 9.3.1 Event Designators
Author Dong Chen
LastMod Wed Feb 13 2019