In the Linux system, if you want to display the date in front of the history, how to set it up? We can configure it in the user's .bashrc file. After the application takes effect, the date can be displayed in front of the history command. Please see the detailed introduction below.
Open Terminal".
bashrc file.
$sudo gedit ~/.bashrc
export HISTTIMEFORMAT=" %F %T "Or you can also use export HISTTIMEFORMAT=" [%Y.%m.%d %H:%M:%S] ”
source command to take effect, or you can also reopen the terminal window.
$source ~/.bashrc
Note: is the date calculated from the time of configuration.
The above is the detailed content of How to make the Linux history command display the date in front?. For more information, please follow other related articles on the PHP Chinese website!