Set Date and Time for Each Command You Execute in Bash History

Set Date and Time for Each Command You Execute in Bash History

I think one of the not so well known secrets of Linux sysadmin is the .bash_history file. Very useful if you want to see what a colleague did to break something or even if you forgot how you did something yourself a few months ago. This little trick makes it even more neat and that is the ability to add a timestamp to the file! Read on thanks to techmint ….

By default, all commands executed by Bash on the command line are stored in history buffer or recorded in a file called ~/.bash_history . This means that a system administrator can view a list of commands executed by users on the system or a user can view his/her command […]