To get history show time
1 2 |
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc source ~/.bashrc |
history -a will append your current session history to the content of the history file.
history -w will replace the content of the history file with your current session history.