In linux, script commands record terminal sessions running script screen. log on ubuntu or other linux systems, and record screen information to screen. log,
A good way to record screen logs until exit... Www.2cto.com # script screen. logScript started, file is screen. log # ls-ltrtotal 76 omitting several lines >>>>>>>>>>>>>>>>>## exitexitScript done, file is screen. log # cat screen. logScript started on # ls-ltrtotal 76 omitting several lines >>>>>>>>>>>>>>>## exitexit Script done on exits abnormally, the log is still recorded. You need to add the parameter script-f ido. log.
Use mkfifo ido. log; script-f ido. log and log on to another terminal. Find the ido. log File, tail-f
It will scroll out the content of your operation. 2. The disadvantage of using a script is that it records all special characters, so the file you enter will be filled with control characters
And ANSI escape sequences. You can use a very simple shell in the script to solve this problem: www.2cto.com SHELL =/bin/bash PS1 = "$" when the script is used, do not use interactive programs or programs that process windows, such as vior top. They will destroy the session
Output result. In addition, the log file records any command line program you use and
Step. If you need to edit a file in the script, consider exiting the script session, and then use script- (
Add a new session after the old session) edit the file and restart the session.