Why do bash history files save timestamps in Unix (Epoch) time?
Issue
- When the
HISTTIMEFORMAT
environment variable is set in any way (for example:HISTTIMEFORMAT="[%F %T] "
),bash
stores 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 usingsu
to switch over to the user?
Environment
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.