in bash
I have some jobs running, in background. They are always producing random irrelevant error messages that pollute the terminal. I am not always so prompt to start them with the 2>&1 > /dev/null
redirect. How can I redirect the output when they are already running?
Bash – redirecting output of running background job in bash
background-processbashio-redirectionoutput
Best Answer
Bash can't modify the file descriptors of a running process.
See answers for How to change the output redirection of a running process? (or a similar thread on stackoverflow)
The easiest and only current tool seems to be reredirect: