Operating System - Tru64 Unix
1752451 Members
6571 Online
108788 Solutions
New Discussion

Sort of .sh_history by date and time?

 
Steven Roberts
New Member

Sort of .sh_history by date and time?

Is there a way to sort the .sh_history file for a user by the date and time of each command?

And is there a way to set it so that the date and time appears in the .sh_history file?
1 REPLY 1
Yong_7
Frequent Advisor

Re: Sort of .sh_history by date and time?

Hi Roberts,

few hints here.

1. in login shell script, echo `date` >> /path_to/.sh_history.

2. in login or logout shell script, rename old file with date suffix.

3. audit can be turned on in order to trace footprints.

have fun !

YJ