如何将IO从一个终端克隆到另一个终端


3

我直接(tty1)并通过ssh(pts / 0)连接到了我的Linux机器。

who
pi       tty1         2013-09-23 11:33
pi       pts/0        2013-09-23 12:17 (192.168.1.26)

我想将所有输入(stdin)和所有输出(stdout / stderr)从一个终端重定向到另一终端,因为我正在使用ssh,但听众应该能够在大屏幕(tty1)上关注会议。

最好的解决方案是将所有内容(整个终端)都从一个终端复制到另一个终端。

有什么建议么?

最好的祝福。

Answers:


1

您可以script为此使用:

 script makes a typescript of everything printed on your
 terminal.  It is useful for students who need a hard
 copy record of an interactive session as proof of an
 assignment, as the typescript file can be printed out
 later with lpr(1).

您只需要将您tty的输出文件提供给script

script -f /dev/tty1
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.