On 27.01.20,22:20, Peng Yu wrote:
> Hi,
>
> I'd like to show the time when the command was run in history. The
> `history` command does not show this info. Is there a way to do so in
> bash? Thanks.
>
Hi,
You can update the HISTTIMEFORMAT environment variable with time
parameters like this:
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile
source ~/.bash_profile
The output of 'history' will then show the command time.
Jostein