Put A TimeStamp on Bash History

Sometimes, it is very helpful to have a timestamp on bash history, that way it’s easier to know the exact time a command was executed. To put a timestamp on history, run the following command; HISTTIMEFORMAT=”%d/%m/%y %T ” That’s all. Next time you run the history command, the history will display with timestamp. Hope someone […]

read more

Timestamping your bash_history

I use this all the time and occasionally find a server that isn’t configured to timestamp the bash_history. It seemed like something I should preserve here for future reference. Adding a timestamp is really simple, just execute the following: echo ‘export HISTTIMEFORMAT=”%d/%m/%y %T “‘ >> ~/.bash_profile ; source ~/.bash_profile That’s it, now the history command […]

read more

Remember when you issued that command…?

Bash History: Display Date And Time For Each Command When working in a clustered environment where sometimes documentation gets written past, it is often helpful to know when you issued certain commands. The bash history is great except it doesn’t include a date/time stamp by default. Here is how to add one: To display the […]

read more