1. script
To use script, simply run script before you start using your terminal
# script -f logfile.log
where -f is to flush output after each write, and logfile.log is the file to write whatever script has recorded.
After finish using script, simply type exit or logout to quit script
2. rootsh
Please install rootsh first if it is not installed. To use rootsh, run rootsh before start using your terminal similar to script
# rootsh -f logfile.log --no-syslog
where -f is to show which file will be used to record the session, in this case logfile.log and --no-syslog is to tell rootsh not to log to /var/log/messages. To quit from rootsh, type exit or logout. All the commands and output will be written to logfile.log.closed to show that rootsh has closed the session.
To view the output file of rootsh and script, more command can be used.
Great stuff, this helped me to quickly find a solution to log activities done through the GTM (MUMPS) prompt started from a Linux prompt.
ReplyDelete