Method of saving command line output information to log (valid under ubunut and arm-linux)
Use the command script
Type script xxx.log at the command line, generate the xxx.log file in the current directory, and then the output information from the command line will be saved to the xxx.log file. When you want to end the save, enter the exit command under the command line to end the save.
At this time, what is saved in the xxx.log file is the information just generated. You can view the file by cat to make it appropriate.
If you cannot use the script command on an arm-linux system, it may be that your file system does not have a configuration that enables the command at the time of production. The solution is to recompile your file system and select it when make menuconfig. Or find a bin file for the command, which is exported to the system's environment variable.