Syndicate content

User Loggedin

Welcome to Gujarat Hosting

How to display time and date in history command?

To Dispalay time and date in the history command to set HISTTIMEFORMAT in bash profile.
 
HISTTIMEFORMAT="%d/%m/%y %T "
Or
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile
 
Where,
%d - Day
%m - Month
%y - Year
%T - Time
To see history type