Why do bash history files save timestamps in Unix (Epoch) time?
Issue
- 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-inhistory, 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 usingsuto switch over to the user?
Environment
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
