Bash history

From wikieduonline
Revision as of 12:14, 22 April 2020 by Welcome (talk | contribs) (→‎Usage)
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'

Activities

  1. Install https://github.com/ohmybash bash customization
  2. Review output from history command

Related commands

See also

Advertising: