本文介绍了如何通过UDP流式传输tmux管道窗格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试同时将tmux窗格的输出保存到文件并使用netcat进行流传输.
I'm trying to simultaneously save the output from a tmux pane to file and stream it using netcat.
有效方法:
tmux pipe-pane -o -t "server" "tee -a '/home/csgoserverp/test.txt'"
echo -n "Hello World" | tee -a '/home/me/text.txt' | nc -4u -w1 0.0.0.0 9999
什么不起作用:
tmux pipe-pane -o -t "server" "nc -4u -w1 0.0.0.0 9999"
tmux pipe-pane -o -t "server" "tee -a '/home/me/test.txt' | nc -4u -w1 0.0.0.0 9999"
任何帮助将不胜感激.
推荐答案
我在某处读到ncat比netcat更好,并且出于某些原因,使用ncat的工作原理未知:
I read somewhere that ncat is better than netcat and for reasons unknown using ncat works:
tmux pipe-pane -t "server" "tee -a '/home/csgoserverp/test.txt' | ncat -4u -w1 0.0.0.0 9999"
这篇关于如何通过UDP流式传输tmux管道窗格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!