For curiosity, I wanted to read a GNU screen session's named pipe.

$ screen -ls
There is a screen on:
    59750.hello     (Detached)
1 Socket in /var/run/screen/S-gergely.

And indeed there is a named pipe:

S-gergely $ ls -l
összesen 4
prw-------. 1 gergely gergely 0 nov   21 11.06 59750.hello

I tried to read it with tail -f, cat and other things to no avail.

Does (Detached) mean that there is no flux of data through this named pipe? Only when the screen is active?

UPDATE: it does not work even when that screen is active

Can I read the data with some standard Unix command-line tool?

  • You are assuming there something there to read. What if the other end of the pipe is in fact waiting to read instead. I believe it's a two way pipe used by screen to talk to its screen daemon process. – Kusalananda Nov 21 '18 at 12:29

When data was read from pipe it was gone from pipe. I don't think that it's possible to have multiple readers which can read same data at same time. So when screen is attached, probably screen process read data before tail/cat that you use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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