Monday, November 26, 2012

Linux : Date/Time Wise History, Date Wise command history in Linux

export HISTTIMEFORMAT="%m/%d - %H:%M:%S: --> "

It will change the HISTTIMEFORMAT variable and bash will store a timestamp in its history accordingly. Then your history will look like this

1  08/16 - 16:12:37: --> cat README | less
2 08/16 - 16:12:58: --> pkg-config --list-all | grep webkit
3 08/16 - 16:13:04: --> history

These are the date/time format you can use.

%d - Day
%m - Month
%y - Year
%T - Time
%H - Hours
%M - Minutes
%S - Seconds

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

How to add "Copy to" and "Move to" options to the right-click context menu in Windows:

Method 1: Registry Editor (Manual) Note: Back up your registry first or create a system restore point. Add "Copy to" Option:...