Showing posts with label how to use histtimeformat. Show all posts
Showing posts with label how to use histtimeformat. Show all posts

Sunday, July 16, 2017

How to use HISTTIMEFORMAT in Linux

Sunday, July 16, 2017 0 Comments
For my test I am using a CentOS VM

If you want a time-stamp to go along with your commands you will need to use the HISTTIMEFORMAT utility in user's bash_profile

For comparison purposes I have shown a HUGE difference it can make when you use a space and no space with HISTTIMEFORMAT

As usual, we make a backup copy of the user's bash_profile before we go clobbering it

Then, add the export HISTTIMEFORMAT="%F %T " line in the user's bash_profile

If you use export HISTTIMEFORMAT="%F %T" this is what you get

So, a teeny tiny space can make a huge difference in Linux!