- When the
HISTTIMEFORMATenvironment variable is set in any way (for example:
HISTTIMEFORMAT="[%F %T] "),
bashstores timestamps for each history item and when a user inspects history with the BASH built-in
history, the timestamps are shown in an easily-readable format (ex:
2013-01-29 11:40:19); however, when these history sessions are saved out to a file (e.g.,
~/.bash_history), the timestamps are shown in Unix time (seconds since the Epoch). Why? How can these be read without using
suto switch over to the user?
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.