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?

JRFerguson
  • 14,570
  • 3
  • 34
  • 40
User12547645
  • 183
  • 2
  • 6
  • 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 '22 at 15:00
  • That really is a shame. Thank you very much for the answer, though – User12547645 Dec 22 '22 at 15:37
  • It's not even possible on linux. Note this comment: https://unix.stackexchange.com/questions/58550/how-to-view-the-output-of-a-running-process-in-another-bash-session#comment640573_308666. When you start the process you must output to a file, then you *can* `tail -f `. – Philip Couling Dec 22 '22 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. – James Risner Dec 24 '22 at 14:30

0 Answers0