Adding Timestamps to your bash history

This is easily done by adding two lines to your .bashrc file.

HISTTIMEFORMAT="(%m/%d/%y) %T "
export HISTTIMEFORMAT

Now your bash history will have the date and time that each command was run.

545  (11/05/07) 08:46:14 ssh root@192.168.0.1

Leave a Reply

You must be logged in to post a comment.