View My GitHub Profile
在存储有限设备产生大量日志的时候,可以用 socat 把日志用传输到记录设备上,我这里用的 UDP :
socat
socat - UDP-LISTEN:<port> # on terminal device <command> 2>&1 | socat - UDP-DATAGRAM:<tarminal-ip>:<port>
这里, 2>&1 是把 stderr 合并到 stdout
2>&1
stderr
stdout