0

I have a process running and I would like to know what it prints to stdout and stderr. On linux I would do

tail -f /proc/<pid>/fd/1

See here

How do I do this on macOS?

4
  • Don't think you can. You could use screen/tmux but this would only works if you run one of them first.
    – nohillside
    Commented Dec 22, 2022 at 15:00
  • That really is a shame. Thank you very much for the answer, though Commented Dec 22, 2022 at 15:37
  • It's not even possible on linux. Note this comment: unix.stackexchange.com/questions/58550/…. When you start the process you must output to a file, then you can tail -f <the file>. Commented Dec 22, 2022 at 16:16
  • +1 use screen to run the process and screen -x to also connect to the screen or just reconnect to it normally. Commented Dec 24, 2022 at 14:30

0

You must log in to answer this question.

Browse other questions tagged .