History with Time in Linux
Use the following command to set the time format.
HISTTIMEFORMAT="%d/%m/%y %T "
Then execute history command. This will display the command with executed time.
history
To make these changes permanent use the below command
HISTTIMEFORMAT="%d/%m/%y %T "
Then execute history command. This will display the command with executed time.
history
To make these changes permanent use the below command
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc
Reload
source ~/.bashrc
After this changed will be permanent.
Comments
Post a Comment