Bash history

From wikieduonline
Revision as of 07:19, 16 December 2019 by Welcome (talk | contribs) (→‎See also)
Jump to navigation Jump to search

Bash Command history feature allows to recall, edit and rerun previous commands. Also allows commands to be saved using the history -a command[1][2].

Variables to control Bash History:

  • HISTFILE[3]: The default value is ~/.bash_history
  • HISTFILESIZE
  • HISTTIMEFORMAT[4]

Usage

  • Basic example:
export PROMPT_COMMAND='history -a'
  • Advanced examples:


Activities

  1. Install https://github.com/ohmybash bash customization

See also

Template:CC License

Source: https://en.wikiversity.org/wiki/Bash_programming/Bash_History

Advertising: