If HISTTIMEFORMAT var is set, then "history" command prints
am 02.12.2007 13:59:29 von Yakov
If I set HISTTIMEFORMAT var, then 'history' command
prints timestamps. For example:
HISTTIMEFORMAT="%c # "; history
But file ~/.bashrc_history contains no timestamps.
How can it print timestamps if '.bashrc_history' contains no
timestamps ?
Yakov
Re: If HISTTIMEFORMAT var is set, then "history" command prints timestamps. But
am 02.12.2007 14:44:57 von Cyrus Kriticos
Yakov wrote:
> If I set HISTTIMEFORMAT var, then 'history' command
> prints timestamps. For example:
>
> HISTTIMEFORMAT="%c # "; history
>
> But file ~/.bashrc_history contains no timestamps.
> How can it print timestamps if '.bashrc_history' contains no
> timestamps ?
It's magic ;)
If you set HISTTIMEFORMAT the first time all entries prior to setting the
variable will get the time stamp of the time the variable was set.
Exit your bash, open a new one and take a look:
tail ~/.bashrc_history.
--
Best regards | Be nice to America or they'll bring democracy to
Cyrus | your country.
Re: If HISTTIMEFORMAT var is set, then "history" command prints timestamps. But
am 02.12.2007 14:49:16 von Cyrus Kriticos
Yakov wrote:
> If I set HISTTIMEFORMAT var, then 'history' command
> prints timestamps. For example:
>
> HISTTIMEFORMAT="%c # "; history
>
> But file ~/.bashrc_history contains no timestamps.
> How can it print timestamps if '.bashrc_history' contains no
> timestamps ?
It's magic ;)
If you set HISTTIMEFORMAT the first time all entries prior to setting the
variable will get the time stamp of the time the variable was set.
Exit your bash, open a new one and take a look:
tail ~/.bash_history.
--
Best regards | Be nice to America or they'll bring democracy to
Cyrus | your country.