4
shell> export HISTTIMEFORMAT='%F %T '
shell> history | tail -n 2
 1006  2010-01-16 00:55:47  export HISTTIMEFORMAT='%F %T '
 1007  2010-01-16 00:55:49 history | tail -n 2

This will last as long as environment variable is set, so if I log out you will need to set it again. How do I make this permanent?

shantanuo
  • 31,689
  • 78
  • 245
  • 403

1 Answers1

3

Add it to your ~/.bashrc and ~/.bash_profile - one of these will be read when bash starts. .bash_profile is read when you login, .bashrc is read when you create a new interactive non-login shell (such as opening a terminal window from X)

Erik
  • 88,732
  • 13
  • 198
  • 189