Display timestamp using HISTTIMEFORMAT for History Command

Usually, when you run the history command, you get the following:

995  ls -la
  996  cd themes/
  997  cd heavenly/
  998  ls
  999  ls -la
 1000  exit

Run the following to get a timestamp

995  2015-12-10 08:31:35 ls -la
  996  2015-12-10 08:31:35 cd themes/
  997  2015-12-10 08:31:35 cd heavenly/
  998  2015-12-10 08:31:35 ls
  999  2015-12-10 08:31:35 ls -la
 1000  2015-12-10 08:31:35 exit

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.