@@ 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`:
```
-qrdr
-receive 0001
-cat hello.txt
+docker exec -u nje nje_node2 receive -o - 0001
```