Where is the output at startup as a background process?

My process displays some log data in console windows. When I run it as a background process, where can I find the output logs?

+7
source share
1 answer

Depends on the process and how you started it. If it is written to stdout (which is likely, given that the output usually refers to the terminal), you can redirect the output to a file using

 command > logfile & 

If you also want to write an error message from stderr , do

 command > logfile 2> errorlogfile & 

or

 command > logfile 2>&1 & 

to get everything in one file.

+14
source

All Articles