Advenced History command in linux / Mac OSx

Recently I started using history command a lot. Just to check what I have done. One thing missing by default is timestamp, I want to know when I did something so to do that you can do this 

echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc
source ~/.bashrc

with that next time you write "history" in your terminal, you will get info like this

503  16/01/19 15:09:38 docker-compose exec -u root php /bin/bash
504  16/01/19 15:09:38 docker-compose exec php /bin/bash
​​​505  16/01/19 15:10:22 history

also you might want to check this thread on how to combine history from multiple opened sessions.

https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-…