9ec855aa5fbefbc49f67c605581342a11b4406f2 — Andrew Kay 1 year, 5 months ago 3c0027c
Improve sending and receiving files example
1 files changed, 16 insertions(+), 6 deletions(-)

M README.md => README.md +16 -6
@@ 28,7 28,7 @@ docker run -it --rm --name nje_node2 --hostname node2 -v $(pwd)/examples/node2:/

If successful, you should see the logs from the `funetnje` process appear.

## Sending messages and files
## Sending messages

The image contains a `nje` user who is a member of the `funetnje` group.

@@ 49,16 49,26 @@ To send a message to `NODE2`:
send nje@node2 hello there!

## Sending and receiving files

Use the `sendfile`, `qrdr` and `receive` commands to send and receive files.

Unlike messages, you do not need to be logged in to the container and, therefore, you can run the commands using `docker exec`.

To send a file to `NODE2`:

sendfile nje@node2 hello.txt
cat local_file.txt | docker exec -i nje_node1 sendfile nje@node2

Then, view spooled files on `NODE2`:

docker exec -u nje nje_node2 qrdr

To receive the file on `NODE2`:
Finally, receive the file on `NODE2` and write it out `stdout`:

receive 0001
cat hello.txt
docker exec -u nje nje_node2 receive -o - 0001