Categories
Freebsd

Add timestamps to history

Add the following to your .bashrc:

export HISTTIMEFORMAT="%h/%d – %H:%M:%S "

The result is this:

[root@server ~]# history
    1  Mar/16 – 18:09:00 cd /etc
    2  Mar/16 – 18:09:10 vi fstab
    3  Mar/16 – 18:09:43 ls -la

Leave a Reply

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.