Online Learning Academy - LearnAcad.com

... Sharing Knowledge

  • Increase font size
  • Default font size
  • Decrease font size
Home

How to display date and time in Linux Bash HISTORY command?

E-mail Print PDF

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

Where,
%d - Day
%m - Month
%y - Year
%T - Time

Last Updated on Thursday, 31 May 2012 07:07  
Follow us on Twitter

Main Menu

Linux

Islam

Windows

Interview Questions

Database

Internet

Cisco

Entertainment

Networking

Graduate Courses

Psychology

Feed Burner

Subscribe to Welcome to Online Learning Academy by Email

Enter your email address:

Delivered by FeedBurner


Google Groups
Subscribe to LearnAcad
Email:
Visit this group

Login Form