WingnutOne |
09-14-2007 11:25 AM |
Quote:
Originally Posted by unSpawn
(Post 2890002)
Maybe tell us why you would want that?
|
I'm one of several admins on a system which constantly has multiple root login shells open. Occasionally, commands issued by different admins working on similar things will cause unexpected problems which we then have to troubleshoot. This job would be easier if we can see all of the commands that were issued, and the order in which they were issued. It would also be nice - though usually less critical - to be able to retain the command history from a shell that locked up, died, or lost it's connection to the host and wasn't able to add it's recent commands list to the permanent $HISTFILE.
I want to create a command history file that logs commands in from each currently open session "on the fly", so that they appear in the order in which they were issued without having to close out all of the sessions first. The only way I've thought of to do this is to set up a function (something like a 'tail -f') that watches for new additions to each shell's temporary command history and drops them all into a shared file.
(We already have the history file being populated with date/time stamps, courtesy of a suggestion from rjwilmsi on another thread.)
|