linux history command with timestamps

Config output format in HISTTIMEFORMAT with below command:

echo ‘export HISTTIMEFORMAT=”%d-%m-%y  %T” ‘  >> ~/.bash_profile; bash

then history to see the different

To make the changes permanent follow the below steps,

you need to add the below line to .bashrc file and then save it,

run the below command to source .bashrc file,

 

Reference:

http://askubuntu.com/questions/391082/how-to-see-time-stamps-in-bash-history