dd if=/dev/urandom bs=512 count=4


write lsr < <(dd if=/dev/urandom bs=512 count=4)

How do I achieve the intended behaviour? Current output:

Message from qwe@hhgw11 on pts/386 at 17:37 ...
  • 3
    Why would you want to do this???
    – derobert
    Jun 8, 2017 at 17:12
  • 2
    This is the intended behaviour. By the author(s) of the write utility.
    – roaima
    Jun 8, 2017 at 17:15
  • 2
    @user234461 Sockets would be a normal way. You could also use a FIFO (though that's inside the filesystem, but it could be somewhere visible to both of you, e.g., /tmp). You could also, if you insist on using wall for this, Base64 or uuencode the data first. But really, if you want to share source code... use a version control system like git.
    – derobert
    Jun 8, 2017 at 17:32
  • 3
    @user234461: Why does your source code contain non-printable characters?  Why not just copy your file to /tmp and let the other user copy it from there? And don't you have email? Jun 8, 2017 at 17:41
  • 3
    You should also be able to mail files to each other if you give mail the -a option to create an attachment. It might use some type of encoding, but your mail user agents will take care if that transparently. Jun 8, 2017 at 18:15

1 Answer 1


Being able to send control characters (other than a few safe ones like newline and tab) to another user's terminal would be a security bug, so there shouldn't be a way.

  • Well in that case, wall has a security bug, because newlines and tabs are control characters.
    – user234461
    Aug 15, 2019 at 0:18
  • 1
    @user234461 True, those are control characters. Edited to fix.
    – derobert
    Aug 15, 2019 at 19:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.