I wants to check on my linux system when which command was fired - at which date and time.
I fired commands like this:
history 50
It shows me the last 50 commands history, but not with date and time at which it was fired. Does any one knows how to do it?
HISTTIMEFORMAT
changes format for future commands, so that timestamp will be saved for them. Timestamps for commands fired before settingHISTTIMEFORMAT
were not saved in histfile, so there's no way to show them. – Rawdonhistory -E
– Funchesexport HITSTTIMEFORMAT
as suggested in the accepted solution and I can see the date/time for previous commands. I am also quite surprised but apparently this info was stored somewhere already. – Rickrickard