Home > Back-end >  The output of the terminal how to save the log file
The output of the terminal how to save the log file

Time:03-12

Linux machines running time long drive are lost, I want to record the log, look a lot like on the Internet is not very ideal, what I need is: is there a simple way to put all the output terminal, or stdout, all save to file inside the log file?
Have bosses provide the train of thought, thank you very much

CodePudding user response:

Write a log, write files written in not have directly

CodePudding user response:

./executable file & gt;> ~/mylog1. TXT
Or
./script files. Sh & gt;> ~/mylog1. TXT

CodePudding user response:

refer to the second floor 4 teacher zhao response:
/executable file & gt;> ~/mylog1. TXT
Or
./script files. Sh & gt;> ~/mylog1. TXT

You this just append the file/additional script to print something, all I want is my machine terminal output, including driving printing, and print error

CodePudding user response:

reference xian0-666-1/response:
write a log, write file directly into not have
could you specific points!

CodePudding user response:

Add print error:
> ~/mylog1. TXT 2 & gt;> ~/mylog1. TXT
Drive the printing is what east east?

CodePudding user response:

You say who is the driving process of start? As long as it is in the terminal started can redirect the output to a file

CodePudding user response:

reference 5 floor 4 teacher zhao reply:
add print error:
> ~/mylog1. TXT 2 & gt;> ~/mylog1. TXT
Drive the printing is what east east?
program crash when print something, such as the print below:
/#
/# (1032) uvccom/st_uvc. C: -- -- -- -- -- Isoc UVC_EVENT_STREAMOFF -- -- -- -- -- - & gt; 1
@ RxDET 3 - & gt; 2
@ Ux 3 - & gt; 3
[APP WRN] [dev:/dev/video0] : _UVC_QBuf [281] : Unable to queue buffer: No to device (19). - & gt; 4
[APP WRN] [dev:/dev/video0] : _UVC_QBuf [281] : Unable to queue buffer: No to device (19). - & gt; 5
[APP WRN] [dev:/dev/video0] : _UVC_QBuf [281] : Unable to queue buffer: No to device (19). - & gt; 6
[APP WRN] [dev:/dev/video0] : _UVC_QBuf [281] : Unable to queue buffer: No to device (19). - & gt; 7
UVC: 3 buffers free. - & gt; 8
UVC: Stop video stream Successfully. - & gt; 9
(sigmastar/tsk_uvc. C 744) : UVC_StopCapture - & gt; 10

1,8,9,10 is my application of printing, 2, 3 should be driven with print, 4, 7 should be c/SDK and print, is what I want, is there any operation or instructions, the print all save to file, so that the machine run to death when I know it's log?
. In addition, I tested the tee,/MRAPP | tee - I - a./log. TXT as if it was ok, but the log save incomplete, lose a final, I don't know how to return a responsibility

CodePudding user response:

CSDN automatically generated the following links to this page,

CodePudding user response:

If the PTS system terminal, you make connection with the software direct recording,
I use SecureCRT, literally,

CodePudding user response:

2./MRAPP & gt; & 1 | tee - I - a./log. TXT like this?

CodePudding user response:

That is out of the system to record,
On the record in the system always has part of the buffer in the crash has not been written when the content of the disk, this is very normal,

CodePudding user response:

references 9 f forever74 response:
if it is a terminal of the PTS, you make connection with the software direct recording,
I use SecureCRT, literally,
machine pack good, high temperature box test, not the serial port

CodePudding user response:

11 references forever74 response:
is out of the system to record,
On record in the system always has part of the buffer in the crash has not been written when the content of the disk, this is very normal,
use the tee, normal operation, there are a lot of is stuck in the buffer zone, has failed to record

CodePudding user response:

The
references to the tenth floor flying_music response:
/MRAPP 2 & gt; & 1 | tee - I - a./log. TXT like this?
if the problem is not in the 2 & gt; & 1 I don't see a lot of printing can print normal printf doesn't play out, like this:
(688) sensor/imx307. C: stEVAttr. S32EV=0 stEVAttr. U32Grad=1
(sensor/imx307. C 424) : isp_antiflicker=1
(sensor/imx307. C 719) : gainlimit=3
(sen

Print to this card in the buffer? Obviously should also print below

CodePudding user response:

Not a serial port, SSH is even,
  • Related