You can export HISTTIMEFORMAT variable, with appropriate date formatting.
For example you can use:
export HISTTIMEFORMAT='%F %H:%M:%S '
In this case the history command will give you an output like this:
~> history 95 2012-11-19 09:46:04 cat xopus.html.1 96 2012-11-19 09:46:04 su - 97 2012-11-19 09:46:04 exit 98 2012-11-19 09:46:04 ping wwwndfe1 99 2012-11-19 09:46:04 mkdir ~/.ssh/ 100 2012-11-19 09:46:04 su - 101 2012-11-19 09:46:08 set | grep HISTTIMEFORMAT 102 2012-11-19 09:46:44 history
No comments:
Post a Comment