A blog for Linux Lovers.

Posted by sibu on June 20, 2009

History with Time and Date.

History with Time and Date

The command history will give you the list of command which you executed earlier. By default you won’t get the the command execution time and date.

If you wish to have a history details with time and date please do the following.

Open /etc/bashrc file and add the following line.

Export HISTTIMEFORMAT=”%h%d - %H:%M:%S”

After adding this line, relogin to the shell and execute the history command.

Add A Comment