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
    Dec 22, 2022 at 15:00
  • That really is a shame. Thank you very much for the answer, though 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>. 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. Dec 24, 2022 at 14:30

0

Your Answer

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

Browse other questions tagged or ask your own question.