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
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc
Reload
source ~/.bashrc
After this changed will be permanent.

Comments

Popular posts from this blog

How to install Apache Tomcat in Ubuntu

The Art of Debbuging

Elemental Skills required by Programmers