Advertisements

Linux – Adding timestamp to history

root@linux:~ # history
2 2013-03-18 15:08:24 vi df_mon.cfg
3 2013-03-18 15:08:38 /var/opt/OV/bin/instrumentation/UXMONbroker -d psmon
4 2013-03-18 15:08:41 ps -ef |grep -i scopeux
5 2013-03-18 15:09:11 perfstat

To have the time and date of when the command is issued when using the bash shell, add the following statement to your .bashrc file

export HISTTIMEFORMAT=”%F %T “

Advertisements
%d bloggers like this: