Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
Showing results for 
Search instead for 
Did you mean: 

Sort of .sh_history by date and time?

Steven Roberts
Occasional Visitor

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?
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 !