Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried this command to print the buffer of an existing screen session to stdout but I don't know why it doesn't print anything.

screen -x lftp -X hardcopy /dev/fd/1
screen -x lftp -X hardcopy /dev/stdout

It works if I use a regular file instead, so why doesn't it print to stdout when I use /dev/fd/1? I do this with other applications don't have an option to write to stdout and it works, so what does GNU/Screen do that makes it not work?

share|improve this question
up vote 1 down vote accepted

It probably doesn't work in this case because the command is sent to the pre-existing screen process, whose stdout is not the same as the stdout of the temporary screen process that you run to connect to the pre-existing screen process. (Disclaimer: this is a guess!)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .