Put A TimeStamp on Bash History
- Aug
- 23
- Posted by TKH Specialist
- Posted in bash, History, linux
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 finds it 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