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