This small tip will allow you to look forward in your shell history, knowing when each of your commands was executed:

~$ export HISTTIMEFORMAT="%d/%m/%y %T "
~$ history
1  20/12/16 17:46:23 sudo apt install lm-sensors
2  20/12/16 17:46:38 watch -n 1 sensors
3  26/12/16 13:56:18 ssh ranger@188.166.9.250
4  28/12/16 16:08:36 sudo apt-get install audacity
5  28/12/16 16:08:57 audacity
6  28/12/16 16:09:01 history

If you want to make this permanent (doesn't reset after terminal restart), add the following line to your .bashrc file.

# File ~/.bashrc
export HISTTIMEFORMAT="%d/%m/%y %T "

Add a comment

Next Post Previous Post