Most of the solution for the write program can be found in Weiss notes, chapter 5. The additions required are as follows: 1. check if user is accepting messages by checking the w bit of the group on each terminal for that user 2. send the message to each terminal the user is accepting messages on 3. if user is not accepting messages on any terminal, say so 4. if user is not logged on, say so All this information can be obtained by using the utmp file and stat()