ui schrieb:
Eine Zeile in der .bash_history soll etwa so aussehen
Ich glaube du verwechselst da etwas - die Formatierung betrifft nur die Ausgabe des Befehls history, in der bash_history muss ein Unix Timestamp gespeichert werden, damit eine eindeutige Umwandlung des Zeitstempels möglich ist.
Aus der Manpage:
HISTTIMEFORMAT
If this variable is set and not null, its value is used as a
format string for strftime(3) to print the time stamp associated
with each history entry displayed by the history builtin. If
this variable is set, time stamps are written to the history
file so they may be preserved across shell sessions. This uses
the history comment character to distinguish timestamps from
other history lines.
Das in der .bashrc funktioniert nicht:
HISTTIMEFORMAT="%A, %d.%m.%Y"
Da das eine Umgebungsvariable ist, würdest du sie ja zumindest exportieren wollen.
Auf meinem Ubuntu 16.04 System funktioniert das:
$ history
[...]
2008 Dienstag, 19.09.17 export HISTTIMEFORMAT="%A, %d.%m.%y "
2009 Dienstag, 19.09.17 history