Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


Bash History: Display Date And Time For Each Command

Mar 14, 2010, 20:04 (1 Talkback[s])

"How do I display shell command history with date and time under UNIX or Linux operating systems?

"If the HISTTIMEFORMAT is set, the time stamp information associated with each history entry is written to the history file, marked with the history comment character. Defining the environment variable as follows:

$ HISTTIMEFORMAT="%d/%m/%y %T "

"OR

$ echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile

Complete Story

Related Stories: