How to check command history by date/time

If you want to check history of the command by date and time, you need to set following export path on the server

root@server [~]# export HISTTIMEFORMAT='%F %T '

then you will get the output of history command like given below:

root@layang [/tmp]# history | grep ls
31 2010-10-24 18:33:45 ls
33 2010-10-24 18:33:45 ls
36 2010-10-24 18:33:45 ls
64 2010-10-24 18:33:45 ls

Thats it :o)