简体   繁体   English

从Linux VM传输到Mac

[英]Pipe from Linux VM to Mac

I tried creating a pipe on a Mac host using mkfifo and reading from a Linux VM. 我尝试使用mkfifo在Mac主机上创建管道并从Linux VM读取数据。

I encountered some issues with concurrent reading and writing and am wondering if there are other ways to make a one-way concurrent read write pipe between Mac and Linux? 我在并发读写时遇到一些问题,想知道在Mac和Linux之间是否还有其他方法可以使单向并发读写管道?

Is this even a proper use of pipes? 这甚至是管道的正确使用吗?

The pipe resides in a location accessible by the Linux VM. 管道位于Linux VM可访问的位置。

Netpipes by Robert Forsman is an elegant solution to this problem. 罗伯特·福斯曼(Robert Forsman)的Netpipes是解决此问题的一种优雅解决方案。 It uses a hose and faucet metaphor to mimic pipes functionality across tcp streams. 它使用软管和水龙头的隐喻来模拟跨tcp流的管道功能。 Netpipes is available as a macports package for Mac OS X besides the usual *nix versions. 除了通常的* nix版本,Netpipes还可以作为Mac OS X的macports软件包提供。

Say you want to transfer a whole bunch of files from your Linux VM to your Mac OSX host using pipes, run these shell commands in their respective shells: 假设您要使用管道将一堆文件从Linux VM传输到Mac OSX主机,请在它们各自的Shell中运行以下Shell命令:

 LINUXVM$ faucet 2222 --out tar cf - .
 OSXHOST$ hose server 2222 --in tar xvf -  

2222 is the port number. 端口号2222。 See the man pages for tunneling and relaying through firewalls and other modern hurdles. 有关通过防火墙和其他现代障碍进行隧道传输和中继的信息,请参见手册页。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM