开发者

Redirect content of /dev/ttySDIO0 to a file

开发者 https://www.devze.com 2023-01-31 09:06 出处:网络
Is there any way to redirect the content of a tty device (/dev/ttySDIO0) file so that its content can be manage开发者_运维问答d using a file IO operations. I don\'t prefer to use \'cat\' here.

Is there any way to redirect the content of a tty device (/dev/ttySDIO0) file so that its content can be manage开发者_运维问答d using a file IO operations. I don't prefer to use 'cat' here.

Thank you.


You can use socat which can connect to a tty on one side with a lot of command line options, and the other end can be pretty much anything that accepts read/write or send/receive call. From the above link :

Socat is a command line based utility that establishes two bidirectional byte streams and transfers data between them. Because the streams can be constructed from a large set of different types of data sinks and sources (see address types), and because lots of address options may be applied to the streams, socat can be used for many different purposes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号