When we run the 'history' command it only gives you command along with the line numbers. Sometimes it’s useful to have a time stamp attached to each command to build a clearer picture.To enable the timestamps in history command , set 'HISTTIMEFORMAT' environment variable.
# export HISTTIMEFORMAT="%d-%b-%Y %r "
To permanently set this variable , add below entry at the end of file/etc/profile
export HISTTIMEFORMAT="%d-%b-%Y %r "
0 comments:
Post a Comment