Get the App
SLTechnology News&Howtos  ›  Servers  › 

Method of saving command line output information to log (valid under ubunut and arm-linux)

Shulou Source: shulou.com Published: 2022-06-03 08:45:48 12月06日 Update

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.

Tags: Commands files systems information time directories inputs methods outputs appropriate and then variables that is location environment production generation compilation configuration valid Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Docker MySQL vpn Apple