Timestamping your bash_history
- Apr
- 05
- Posted by TKH Specialist
- Posted in bash, System Administration
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 is more useful.
Recent Comments
- Stefan on Flush This!
- Timestamping your Bash History | Matt's Entropy on Remember when you issued that command…?
- Matt Smith on Remember when you issued that command…?
- Ruan on Putting ‘lsof’ to use
- Dylan F. Marquis on External Mapping of LDAP attributes in CAS