|
have the following command in the .profile of every user
script -a $LOGNAME
the above would generate all the output and commands entered in the file named $LOGNAME
and while disconnecting from the session,
the user has to specifically issue exit or ctrl-D twice
to quit from script process
and from the current shell
where process script is spawned over the current shell
later check for the file content redirected through script command and modify according to ur needs.
And,
to retrieve a copy of all the commands or characters entered by the user (including the control characters ) there should be a way to duplicate the output descriptor of the shell to redirect to STDOUT and the required filename.
May be the Gurus would help regarding this !!!
|