Bash programming/Bash History

Bash Command history feature allows to recall, edit and rerun previous commands. Also allows commands to be saved using the  command.

Variables to control Bash History:
 * HISTFILE : The default value is ~/.bash_history
 * HISTFILESIZE
 * HISTTIMEFORMAT

Usage

 * Basic example:


 * Advanced examples:
 * Sending history to syslog (needs recompiling source): Bash also support syslog capabilities at compiling time but it is not enabled by default in most distributions: https://github.com/bminor/bash/blob/d233b485e83c3a784b803fb894280773f16f2deb/config-top.h
 * Sending history to syslog (needs recompiling source): Bash also support syslog capabilities at compiling time but it is not enabled by default in most distributions: https://github.com/bminor/bash/blob/d233b485e83c3a784b803fb894280773f16f2deb/config-top.h
 * Sending history to syslog (needs recompiling source): Bash also support syslog capabilities at compiling time but it is not enabled by default in most distributions: https://github.com/bminor/bash/blob/d233b485e83c3a784b803fb894280773f16f2deb/config-top.h

Logging
If you wish to keep a record of your commands, you can configure bash to write a log file of entered commands.

Logging can be set up automatically by running these commands:


 * The first line creates a configuration file for  contaning the log file destination , which may be changed as desired. The   part prevents redundantly outputting the text into the command line window.
 * The second adds the log line definition  to , which runs upon each start of the terminal.
 * The third line restarts the  service to make the changes effective.

Activities

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