redirect output of a running program to /dev/null
Is it possible to change stdout after starting something as a background application in the command line?
Say I run test.py:
import time while True: print "Hello" time.sleep(1)
and then do:
$ python test.py &
Can I redirect the output to
With an answer on this site: How to redirect output of a running program to /dev/null by Mike Perdide
It's also a direct duplicate of a StackOverflow question: Redirect STDERR / STDOUT of a process AFTER it's been started, using command line?