Samstag, 12. Dezember 2015

Copying files with socat



  1. Start to listen on one node. The following command will pipe everything it gets into the file out.txt. It blocks until it read EOF. So we're listening on tcp port 9999.
    sudo socat tcp-listen:9999 OPEN:out.txt,creat
  2. After you startet the receiver, you might read from a file and pipe into a socket to your receiver. Now we're sending to localhost (127.0.0.1) at port 9999, our unnamed0.graphml.
    socat file:unnamed0.graphml tcp:127.0.0.1:9999