history command with date and timestamp

You can get a more detailed display of your bash history by including the date and timestamps. This can be done by defining an environmental variable.

HISTTIMEFORMAT="%d/%m/%y %T"

After defining this variable your bash history should look like this:

 963 13/06/12 20:14:39 ls  
 964 13/06/12 20:14:43 cd models/
 965 13/06/12 20:14:44 ls
 966 13/06/12 20:14:53 git pull
 967 13/06/12 20:15:05 git push

Tagged under: history, bash, timestamp