Showing posts with label date. Show all posts
Showing posts with label date. Show all posts

Saturday, October 15, 2016

bash history with timestamps

This is definitely something useful!
How to attach timestamps to the history of the bash commands?
Simple:  just set (in the way you like to have your time format) the bash variable HISTTIMEFORMAT

For example to have the format: day/month/year - hours:minutes:seconds" type this:

export HISTTIMEFORMAT="%d/%m/%y - %H:%M:%S: "

and then just run history

That's it!

Source
 stackoverflow